Ask Your Question

Installation SageMath on Ubuntu 17.04

asked 2017-04-23 11:25:27 -0500

ortollj gravatar image

Finally due to the problems of transfer of text between the VM and the Host I prefer to try installing sagemath on a PC W10 and UBUNTU in double boot mode. I will switch to Ubuntu when I want to use SageMath What's wrong ?

jpo@jpodesktop:~/Téléchargements$ cd SageMath/

jpo@jpodesktop:~/Téléchargements/SageMath$ ./sage

Rewriting paths for your new installation directory

This might take a few minutes but only has to be done once.

Traceback (most recent call last): File "/home/jpo/Téléchargements/SageMath/", line 139, in <module> p = SearchAndReplace(ROOT_PATH, '/home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2', DESTINATION) File "/home/jpo/Téléchargements/SageMath/", line 120, in __init__ self.root_path = root_path.encode('utf-8') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128) ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 7.6, Release Date: 2017-03-25 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘

ERROR: The Sage installation tree has moved

from /home/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391yaj2 to /home/jpo/Téléchargements/SageMath

This is not supported, and Sage will not work. To install Sage from a binary package:

  1. Open the .tar.bz2 archive (or .dmg on OSX)

  2. Move the SageMath folder/app to where you want it to be. You can also rename the directory now.

  3. Start sage for the first time. This will then automatically patch paths in binaries.

After starting Sage for the first time you cannot change the installation any more. To install Sage elsewhere, start over from the binary package. Or recompile Sage from scratch in the new location ("make distclean && make")

edit retag flag offensive close merge delete


File "/usr/share/sagemath/bin/sage-ipython", line 7, in <module> from sage.repl.interpreter import SageTerminalApp File "/usr/lib/python2.7/dist-packages/sage/repl/", line 107, i$ from sage.repl.preparse import preparse File "/usr/lib/python2.7/dist-packages/sage/repl/", line 223, in <$ import six ImportError: No module named six

ortollj gravatar imageortollj ( 2017-04-23 12:27:55 -0500 )edit

3 answers

Sort by » oldest newest most voted

answered 2017-04-25 10:12:36 -0500

eric_g gravatar image

updated 2017-04-25 10:14:37 -0500

It seems that the first problem you've encountered is due to unpacking the binary archive in the directory Téléchargement, the name of which contains non-ascii characters. The solution is simply to move the archive to another location (e.g. your home directory) before unpacking it. More precisely, to install the latest stable version of SageMath under Ubuntu, type the following in a console:

mv Téléchargements/sage-7.6-Ubuntu_16.04-x86_64.tar.bz2 .
bunzip2 sage-7.6-Ubuntu_16.04-x86_64.tar.bz2
tar xvf sage-7.6-Ubuntu_16.04-x86_64.tar
cd SageMath
./sage -n jupyter
edit flag offensive delete link more

answered 2017-04-23 11:30:46 -0500

ortollj gravatar image

updated 2017-04-25 07:24:04 -0500

I try to copy paste the terminal window content, but Even that I failed on Linux ( the world windows is well done often criticized by not very nice people of geeks but it works well. not to spend hours to install software.

edited: I changed my qualifier not very polite (the one that started with a F ..)

EDited all is OK now !!!

see SageMath on Ubuntu

edit flag offensive delete link more


precedently I tried this (failed too !!)

(PC mode dual boot W10 and Ubuntu 17.04). I installed Sage with this command:

sudo apt install sagemath-common Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait sagemath-common is already the newest version (7.4-7ubuntu1). 0 mis à jour, 0 nouvellement installés, 0 à enlever et 7 non mis à jour.

jpo@jpodesktop:/usr/local/bin$ sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 7.4, Release Date: 2016-10-18 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘

ortollj gravatar imageortollj ( 2017-04-23 12:26:10 -0500 )edit

answered 2017-04-24 05:01:56 -0500

dan_fulea gravatar image

updated 2017-04-24 09:42:06 -0500

Try for instance to find a deb file and install using it. Or use a ppa, e.g.


edit flag offensive delete link more


thank you dan_fulea I have a little softened my sentence as you can see below. now when I enter the command :sudo apt-get update

I get:

The repository ' zesty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Impossible de récupérer  404  Not Found
ortollj gravatar imageortollj ( 2017-04-24 08:17:28 -0500 )edit

as I did not get answer this morning I also post about my PB On Ubuntu Forum Sorry

ortollj gravatar imageortollj ( 2017-04-24 08:31:52 -0500 )edit

This is just a comment, it reflects my experience and does not directly answer the question. Ubuntu is a great linux distro, but has its own limitations. Users expect a high compatibility of the packages, they get it in 99% of all cases, and the Ubuntu devel team realizes a hard task to put the packages work together. Unfortunately, the wide variety of the sagemath software bundled together makes it impossible to still have full compatibility. Ubuntu 12 & 14 were perfectly working with the ppa. Beginning with Ubuntu 16 there were some install problems. I remember that i had also to declare the "previous name" in the repository - just like the answer on the Ubuntu forum posted above. (Now: Replace zesty -> yakkety .) Then it worked for a long time.

dan_fulea gravatar imagedan_fulea ( 2017-04-24 09:31:29 -0500 )edit

Continuation: Because of this, now i am running manjaro linux, it is a distro with good French support and provides a quick access to Arch-Linux, and to the Arch User Group (AUR) repositories. (Without the need to really know everything about details.)

Sagemath could be installed last days on my machine by one click from AUR. This is simply great! (In Arch every user is and has to be actively responsible for the own package dependencies. With this strategy sage has better chances to get updated and resolve all dependencies. And the Arch interest in a sagemath portability is visibly stronger than the effort in the Ubuntu world.

dan_fulea gravatar imagedan_fulea ( 2017-04-24 09:41:04 -0500 )edit

The page

has a Signing Key / a finger print. (Use it via apt-key to get rid of the error.) Some lines above there is a line:

Display sources.list entries for:

And the drop down list does not offer zesty yet. But yakkety is present.

dan_fulea gravatar imagedan_fulea ( 2017-04-24 09:54:08 -0500 )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


Asked: 2017-04-23 11:25:27 -0500

Seen: 409 times

Last updated: Apr 25