Ask Your Question
2

Installing optional packages - infinite loop

asked 2020-09-04 06:53:56 +0200

Matt gravatar image

I am using SageMath 9.1 on a Window machine.

I would like to install the gap_packages optional package, so I typed the following into the shell.

sage -i gap_packages

This gives the following output (repeating indefinitely):

make build/make/Makefile --stop
make[1]: Entering directory '/opt/sagemath-9.1'
make build/make/Makefile --stop
make[2]: Entering directory '/opt/sagemath-9.1'
make build/make/Makefile --stop
make[3]: Entering directory '/opt/sagemath-9.1'
make build/make/Makefile --stop
make[4]: Entering directory '/opt/sagemath-9.1'
make build/make/Makefile --stop
make[5]: Entering directory '/opt/sagemath-9.1'
make build/make/Makefile --stop
make[6]: Entering directory '/opt/sagemath-9.1'
make build/make/Makefile --stop
make[7]: Entering directory '/opt/sagemath-9.1'
make build/make/Makefile --stop
make[8]: Entering directory '/opt/sagemath-9.1'
...

The same behavior occurs whenever I try to install any of the other optional packages.

Where am I going wrong here?

edit retag flag offensive close merge delete

Comments

1

I also have this problem.

sandy_scott gravatar imagesandy_scott ( 2020-12-01 18:30:41 +0200 )edit

2 Answers

Sort by » oldest newest most voted
3

answered 2020-12-29 00:18:23 +0200

sandy_scott gravatar image

I fixed this a stupidly complicated way - by installing Sage math from source on WSL.

It works great, and it's not super complicated, but it is a faff. I documented the process on my website . Its basically just the official sage instructions with most of the decision making done for you, and the bits you need to do before and after to make it work with WSL.

edit flag offensive delete link more

Comments

Would you mind write this up for the Sagemath Installation Guide ? The process is described in the Sage develoiper's guide. Basically, you submit a patch against the Installation Guide source. It is not supe-steamlined, but it is tolerably easy, even for dummies of my kind...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2020-12-29 19:17:59 +0200 )edit

Thanks a lot for your install process ! I will add: do not forget to enable virtualization in UEFI.

For me the make command begun at 11:26 end end at at 13h15 (less than 2 hours) I did not arrive to exit edit and save after,edit ~/.bashrc ! ;-( , so I used nano ;-)

and also I encounter a problem of right of access to the W10 Documents directory

ortollj@DESKTOP-K30FLRP:~$ cd /root/mnt/c/Documents\ and\ Settings/ortollj
-bash: cd: /root/mnt/c/Documents and Settings/ortollj: Permission denied
ortollj@DESKTOP-K30FLRP:~$

I suppose I have to do something in Powershell ?

ortollj gravatar imageortollj ( 2020-12-29 19:27:40 +0200 )edit

OOPS !

I was wrong about my user name W10 which is simply: user !. but now with the good user name : user, I still got the pb

ortollj@DESKTOP-K30FLRP:/$ cd /root/mnt/c/Documents\ and\ Settings/user
-bash: cd: /root/mnt/c/Documents and Settings/user: Permission denied
ortollj@DESKTOP-K30FLRP:/$
ortollj gravatar imageortollj ( 2020-12-29 19:40:08 +0200 )edit

The "/root" at the beginning of the path shouldn't be there, so the command would be: cd /mnt/c/Documents\ and\ Settings/user

sandy_scott gravatar imagesandy_scott ( 2020-12-29 20:08:21 +0200 )edit
1

oops again, Sorry !

ortollj@DESKTOP-K30FLRP:/mnt/c/Documents and Settings/User$ cd ~
ortollj@DESKTOP-K30FLRP:~$ pwd
/home/ortollj
ortollj@DESKTOP-K30FLRP:~$ cd /mnt/c/Documents\ and\ Settings/user
ortollj@DESKTOP-K30FLRP:/mnt/c/Documents and Settings/user$

its ok now

ortollj gravatar imageortollj ( 2020-12-29 21:18:59 +0200 )edit

Sorry but I still meet one last pb, each time I try to ./sage_nb.sh I have to make a copy paste of the http with the tocken in a browser to launch JupyterLab

Start : This command cannot be run due to the error: The system cannot find the file specified. At line:1 char:1 + Start "file:///home/ortollj/.local/share/jupyter/runtime/nbserver-141 ...

and in fact I do not actually see a file that begins with nbserver-141 but rather nbserver-1441-open.html

ortollj@DESKTOP-K30FLRP:~$ cd /home/ortollj/.local/share/jupyter/runtime
ortollj@DESKTOP-K30FLRP:~/.local/share/jupyter/runtime$ ls
nbserver-1209-open.html  nbserver-1441-open.html  nbserver-1672-open.html  nbserver-1902-open.html  notebook_cookie_secret
nbserver-1209.json       nbserver-1441.json       nbserver-1672.
ortollj gravatar imageortollj ( 2020-12-30 08:54:10 +0200 )edit

I see somebody has the same pb on stackOverflow

I change my default browser by Edge en now I got :

Start : This command cannot be run due to the error: The system cannot find the file specified. At line:1 char:1 + Start "file:///home/ortollj/.local/share/jupyter/runtime/nbserver-818 ...

ortollj gravatar imageortollj ( 2020-12-30 09:06:48 +0200 )edit

I succeed creating file jupyterlab --generate-config :

ortollj@DESKTOP-K30FLRP:~$ sage --notebook jupyterlab --generate-config
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.2, Release Date: 2020-10-24                     │
│ Using Python 3.8.5. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
Please wait while the Jupyterlab server starts...
Writing default config to: /home/ortollj/.sage//jupyter-4.1/jupyter_notebook_config.py
ortollj@DESKTOP-K30FLRP:~$

but what does he mean by : then change the following line: c.NotebookApp.use_redirect_file = False

remove the # ? I cant put the the jupyter_notebook_config.py (not enough place) .

ortollj gravatar imageortollj ( 2020-12-30 13:41:28 +0200 )edit

I put my content of jupyter_notebook_config.py in a comment on sandy_scott web site

ortollj gravatar imageortollj ( 2020-12-30 13:57:26 +0200 )edit

all is ok Now !!! ;)

in the file /home/ortollj/.sage//jupyter-4.1/jupyter_notebook_config.py,as josebrwn said in stackOverflow i added the line:

#--------------------------------------------------------------
# NotebookApp(JupyterApp) configuration
#--------------------------------------------------------------
c.NotebookApp.use_redirect_file = False

and in the file ~/.bashrc I added the line, after installing Chrome Browser in W10:

export BROWSER='/mnt/c/Program Files/Google/Chrome/Application/chrome.exe'

(not Program Files (x86)/ for me,

my chrome.exe is located in Program Files/Google/Chrome/Application/)

and now when launch my windows shortcut( I named sageJupyterLab) , Jupyter_lab is lauching ;-). Thank you very much @sandy_scott

ortollj gravatar imageortollj ( 2020-12-30 19:30:06 +0200 )edit

I'm glad it all worked, though I didn't see any of those issues with my installation, I was clearly very lucky.

sandy_scott gravatar imagesandy_scott ( 2020-12-31 00:47:23 +0200 )edit
1

@emmanuel-charpentier - I've made some changes to the Documentation, Trac ticket with commit attached is here: https://trac.sagemath.org/ticket/31138

sandy_scott gravatar imagesandy_scott ( 2020-12-31 00:49:14 +0200 )edit
1

answered 2020-12-29 19:30:45 +0200

Emmanuel Charpentier gravatar image

The version installed by the Windows binary installer runs on top of Cygwin, which is a library providing Unix-like routines and (pseudo-)system calls to binaries resulting from compiling (possibly adapted) Unix sources against it.

This approach is quite different from WSL use, since it attempts to use the Windows kernel (and some Windows libraries). It has for a long time been the only alternative to the installation of a virtual machine and a Linux distribution in it in order to install and run Sagemath.

In this setup, adding optional packages is not absolutely obvious. As far as I know, this is not (yet) fully supported, notwithstanding the main developer's (Eric Madison Bray) gigantic efforts in that direction.

WSL installation, as described by sandy_scott, amounts to a kind of virtual machine installation, but in an environment where the Linux kernel can "talk" directly to the Windows kernel, possibly streamlining the process.

Would you mind reviewing the issues filed at the binary installer Github page (and possibly open a new one if necessary) ?

edit flag offensive delete link more

Comments

I confess I was genuinely surprised at how well the WSL installation worked - I was expecting a deal-breaking issue to pop up at some point and it never did :-). I can add an issue, but my motivation for the from-source install was the same as the OP's problem - I wanted to install optional packages, in my case the jupyterlab_widgets package to get interact working in JupyterLab.

sandy_scott gravatar imagesandy_scott ( 2020-12-29 20:24:56 +0200 )edit

@sandy_scott there is an error in step 3, it is not :

cd /mnt/c/Documents\ and\ Settings\[your windows username]

but

cd /mnt/c/Documents\ and\ Settings/[your windows username]

like you write in step 4

ortollj gravatar imageortollj ( 2021-01-10 09:04:20 +0200 )edit

in Jupyter_lab part step 5, if W10 2004, it will be not :

Change Target to: ubuntu.exe run ~/sage_nb.sh

but:

Change Target to: ubuntu2004.exe run ~/sage_nb.sh

but I think that installing again on a second PC it was due to W10 2004 and also because I use Ubuntu 20.04 for WSL (because in my previous installation on another PC Change Target to: ubuntu.exe run ~/sage_nb.sh was ok despite I use also Ubuntu 20.04 !)

W10 Ubuntu 2004

C:\Users\jean-pierre>where ubuntu2004.exe C:\Users\jean-pierre\AppData\Local\Microsoft\WindowsApps\ubuntu2004.exe

ortollj gravatar imageortollj ( 2021-01-11 07:44:48 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-09-04 06:53:56 +0200

Seen: 284 times

Last updated: Dec 29 '20