sage-windows
sage-windows copied to clipboard
Maybe include some "optional" packages by default
Until there's a better resolution to the issue of installing optional packages, which is still tricky to get right in all cases, maybe it would be good to include a few of them by default, as long as they're not too large (the real problem is just with large optional packages).
This can be a place to collect a list of optional packages that might be good to include by default in the installer. A few I know:
- fricas (because I've been explicitly asked to fix its support in Cygwin before)
- latte_int (someone on ask.sagemath.org was trying to install it)
- qepcad
- beautifulsoup
- sagetex
Notes on support for various optional packages on Windows:
- [ ] 4ti2 - installs successfully with
sage -i
, some tests fail: https://trac.sagemath.org/ticket/29193 - [x] bliss - now comes pre-installed
- [x] coxeter3 - now comes pre-installed
- [ ] cryptominisat - fails at configure time; no fix yet
- [ ] fes - doesn't even have a new-style SPKG yet so no idea if anyone uses this or if it works
- [x] mcqd - now comes pre-installed
- [ ] meataxe - fails at link time; no fix yet: https://trac.sagemath.org/ticket/29152
- [x] primecount - now comes pre-installed
- [ ] rst2ipynb - pure Python, but depends on pandoc which is not packaged for Cygwin (nor is Haskell which pandoc uses), so this might be a problem without at a minimum adding SPKGs for these as well...
- [ ] sirocco - doesn't build yet, but has pending fix https://trac.sagemath.org/ticket/29149
- [x] tdlib - now comes pre-installed
- fricas builds but has some test failures--it seems to have some of the same failures on Linux too though
- latte_int fails to build on Cygwin; will have to investigate
For a long time, the installation ocs recommended the installation of database_gap ; however, they deemed it problematic for licensing reasons (I never got any firm advice about this one).
Fricas has indeed some points to it. It is supposed to find any real integral expressible in terms of elementary functions (it doesn't now, but I suspect that its interface is perfectible...).
- fricas (because I've been explicitly asked to fix its support in Cygwin before)
That would be fine :) Either because of the sage-fricas interface and/or because there is no really well maintained FriCAS version for Windows anyway (save the old 32-bit Cygwin version). So, using the Sage installer on Windows would provide Windows users besides sage with a 64-bit fricas as well (I'm using it frequently, with sixel graphics ;)
How did you get fricas working? Find my ordeal below:
Apt Cyg (for missing packages) https://github.com/transcode-open/apt-cyg
Quick start apt-cyg is a simple script. To install:
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg install apt-cyg /bin
Example use of apt-cyg: apt-cyg install nano
Get FriCAS running on Sage 8.0 Windows:
- Open SageMath 8.0 Shell (run as Administrator)
- Get and unpack FriCAS source tarball
- patch configure configure.patch (use patch below)
- ./configure --with-lisp=ecl --without-x
- make & make install (install needs Admin rights)
- fricas --> FriCAS Computer Algebra System Version: FriCAS 1.3.2 Timestamp: Di, 31. Okt 2017 23:40:58
--- configure.orig 2017-04-25 13:41:49.000000000 +0200 +++ configure 2017-10-28 22:29:44.417592600 +0200 @@ -2302,6 +2302,7 @@ fi $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in --) ;; +-) ;; ) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build @@ -2335,6 +2336,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in --) ;; +*-) ;; ) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host @@ -2368,6 +2370,7 @@ fi $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in --) ;; +_-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target
On 05.01.2018 14:12, Erik Bray wrote:
Until there's a better resolution to the issue of installing optional packages, which is still tricky to get right in all cases, maybe it would be good to include a few of them by default, as long as they're not too large (the real problem is just with /large/ optional packages).
This can be a place to collect a list of optional packages that might be good to include by default in the installer. A few I know:
- fricas (because I've been explicitly asked to fix its support in Cygwin before)
- latte_int (someone on ask.sagemath.org was trying to install it)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sagemath/sage-windows/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/ABcVYoPx1ay3NZyX3mpx3kIqrOiZIaYfks5tHh_PgaJpZM4RUba1.
Per Thierry,
Beyond those considerations, personally, my choices would be, in a vaguely decreasing order (but this is all very subjective):
- rst2ipynb
- cryptominisat
- cbc
- latte_int
- polymake
- (py)-normaliz
- gdb
- d3js, threejs (in order not to leak)
- fricas
- qepcad
- ore_algebra
- dot2tex
@nilqed
So, using the Sage installer on Windows would provide Windows users besides sage with a 64-bit fricas as well (I'm using it frequently, with sixel graphics ;)
Funny you should mention that--I've been meaning to make a sixel display formatter for Sage--i.e. so that plots and such can be displayed directly in the terminal. This would be especially nice on Windows I think. I raised the issue in sage-devel a while back and nobody seemed interested though so I put it down on the TODO list.
The trickiest aspect is that there's no easy way to determine whether or not the user's terminal supports it, but at the very least it could be enabled upon request.
@nilqed
How did you get fricas working? Find my ordeal below
IIRC sage -i fricas
works fine on Sage in Cygwin.
On 22.01.2018 15:23, Erik Bray wrote:
@nilqed https://github.com/nilqed
So, using the Sage installer on Windows would provide Windows users besides sage with a 64-bit fricas as well (I'm using it frequently, with sixel graphics ;)
Funny you should mention that--I've been meaning to make a sixel display formatter for Sage--i.e. so that plots and such can be displayed directly in the terminal. This would be especially nice on Windows I think. I raised the issue in sage-devel a while back and nobody seemed interested though so I put it down on the TODO list.
Oh, I wasn't aware ... but a good idea.
nobody seemed interested though Probably because 'sixel' isn't widely known anymore.
I guess you're using libsixel as well?
http://saitoha.github.io/libsixel/ https://github.com/saitoha/libsixel
Works with any reasonable terminal emulation like xterm, mintty, mlterm etc.
I'm using it besides gnuplot/set term=sixel to render the TeX output of various systems, like maxima, reduce, pure , fricas, sympy (so it should work for sage as well). I've written a sh script 'latex2sixel' which does the job if the app has a system interface.
The cygwin 'gnuplot' works fine, however, one has to adjust the color scheme when using the default (black) background. https://groups.google.com/forum/#!topic/fricas-devel/GJfUAyH2S2I
The trickiest aspect is that there's no easy way to determine whether or not the user's terminal supports it, but at the very least it could be enabled upon request.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sagemath/sage-windows/issues/14#issuecomment-359437436, or mute the thread https://github.com/notifications/unsubscribe-auth/ABcVYqcnkUpHGILeLvf2r2wx9kVqQMGZks5tNJnzgaJpZM4RUba1.
#!/bin/bash
function usage() { cat <<ENDUSAGE
This is latex2sixel V 1.0.0 :: (TeX Live)
Usage: $0 [OPTION]... TEXSTRING Options are chosen to be similar to dvips' options where possible:
-D # Output resolution -O c Image offset -T c Image size (also accepts '-T bbox' and '-T tight')
-bg s Background color (TeX-style color or 'Transparent') -fg s Foreground color (TeX-style color)
-h | --help Help
= number s = string
c = comma-separated dimension pair (e.g., 3.2in,-32.1cm)
TEXSTRING is a LaTeX expression betweeen apostrophes (not quotes). Examples: '$\alpha$' | '\LaTeX' | 'This is math: $x+y$'.
Required applications: latex, dvipng, img2sixel. Terminals supporting sixel graphics: xterm -ti vt340, mintty, mlterm.
ENDUSAGE }
[[ $# == 0 ]] && { usage;exit; }; [[ $1 == -h ]] && { usage;exit; }; [[ $1 == --help ]] && { usage;exit; };
config (default)
pt=11pt fg=Green bg=Black D=150 #120 T=bbox #bbox,tight ... O=-1.0cm,-2.0cm img=img.png
option parsing
while [[ $# -gt 1 ]] do arg="$1"
case $arg in -D|--resolution) D="$2" shift # past argument ;; -O|--offset) O="$2" shift # past argument ;; -T|--size) T="$2" shift # past argument ;; -fg|--forecolor) fg="$2" ;; -bg|--backcolor) bg="$2" ;; *) # unknown option ;; esac shift # past argument or value done
TeX
texsrc=$BASH_ARGV
TEX=$(cat <<EOF \documentclass[$pt]{article} \usepackage{amsmath,amssymb} \usepackage{breqn} \pagestyle{empty} \begin{document} $texsrc \end{document} EOF )
#echo $TEX
LATEX="latex -jobname=sixel -interaction=nonstopmode" DVIPNG="dvipng -T $T -D $D -O $O -fg $fg -bg $bg -q -o $img"
#mkfifo sixel.dvi #ls -l sixel.dvi
echo $TEX | $LATEX > /dev/null 2>&1 $DVIPNG sixel.dvi > /dev/null 2>&1 img2sixel $img
rm sixel.* rm img.png
On 22.01.2018 15:25, Erik Bray wrote:
@nilqed https://github.com/nilqed
How did you get fricas working? Find my ordeal below
IIRC |sage -i fricas| works fine on Sage in Cygwin.
Actually, I didn't know that there already is a package. I thought one has to compile/install fricas as usual. I have to catch up on this. Thanks.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sagemath/sage-windows/issues/14#issuecomment-359437796, or mute the thread https://github.com/notifications/unsubscribe-auth/ABcVYq7Wz9XMR0WAiEoFws4detx75JX8ks5tNJpBgaJpZM4RUba1.
Please consider adding BeautifulSoup or beautifulsoup4. This is needed to convert legacy .sws Sage worksheets to Jupyter notebook worksheets using sws2rst and rst2ipynb.
Another vote for qepcad from this Ask Sage question:
A vote for ImageMagick from this Ask Sage question:
Could JupyterLab come pip-installed by default?
I vote for dot2tex but that only makes sense only if Poset.show() produces nice pictures. It does so by calling respectively graphviz -> dot2tex -> pdflatex. Not sure which of these are already included and/or part of the dot2tex package.
Hello, I just installed sage 8.2 (windows) and tried to install database_gap
but it was not successful. What I did was
- navigate to
/cygdrive/c/Program Files/SageMath 8.2/runtime/opt/sagemath-8.2
using Cygwin 64 terminal. - issue
./sage -i database_gap
.
I got an error make: *** No rule to make target 'all-toolchain'. Stop.
Any ideas how to install an optional package?
Thanks.
A vote for ImageMagick from this Ask Sage question
I don't think imagemagick is a sage spkg at all. Nothing is stopping them from installing additional cygwin packages, though it will help if user installs are possible (which they will be in the next release).
It seems to take quite a long time to compile qepcad. So ti would be great to have it as part of sage.
Install fricas also takes hours on my old laptop.
Another vote for 4ti2
and latte_int
from this sage-devel discussion:
- https://groups.google.com/d/topic/sage-devel/bt9Ut9dcy4g/discussion
In the meantime I'm working (probably before the end of this week) to fix issue #34 so that sage -i
will work again for optional packages.
In the newest release I've included the following optional packages installed by default:
- bliss
- coxeter3
- mcqd
- primecount
- tdlib
Although these are mostly not packages that people have suggested in this issue, this particular set was chosen because sagelib has optional C extensions that depend on them. Thus, by pre-installing these packages, the sage optional extensions that depend on them are also built and work. In particular, these packages also build correctly on Cygwin, and the tests in Sage that use them all pass. Currently missing from this list are sirocco, meataxe, and fes which do not yet meet those criteria.
Other optional packages are as far as I know not build dependencies for sagelib, so if they are installed later they can still be used by Sage without rebuilding it. I've added a few partial workarounds for #34, so manually installing additional optional packages should work again (e.g. I confirmed that sage -i 4ti2
works).
These Stack Overflow questions indicate gap_packages
might be worth adding:
This might count as another vote for including fricas:
I'll vote for jupyterlab_widgets
as the lack of it motivated me to install it from source in WSL.
Last year there was a question on Ask Sage about installing pygraphviz.
Related: failure to install plantri in a Sage-Windows installation: https://ask.sagemath.org/question/56405
Another vote for pynormaliz:
Another question about installing plantri.