Ask Your Question
1

sagemath launch problems on Ubuntu

asked 2019-04-15 18:51:24 +0200

Vasily Galchin gravatar image

updated 2019-04-16 21:57:35 +0200

FrédéricC gravatar image

I think I have a SageMath environment variable setting problem causing to SageMath to throw Python exceptions at startup.

Here are my software versions:

vasily@vasily-Latitude-E7240:~$ sage --version
SageMath version 8.1, Release Date: 2017-12-07
vasily@vasily-Latitude-E7240:~$ python --version
Python 2.7.15rc1
vasily@vasily-Latitude-E7240:~$ uname -a
Linux vasily-Latitude-E7240 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
vasily@vasily-Latitude-E7240:~$ uname -v
#50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019

Here is the Python backtrace:

Traceback (most recent call last):
  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/interpreter.py", line 107, in <module>
    from sage.repl.preparse import preparse
  File "/usr/lib/python2.7/dist-packages/sage/repl/preparse.py", line 225, in <module>
    import six
ImportError: No module named six
Traceback (most recent call last):
  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/interpreter.py", line 107, in <module>
    from sage.repl.preparse import preparse
  File "/usr/lib/python2.7/dist-packages/sage/repl/preparse.py", line 225, in <module>
    import six
ImportError: No module named six

Somehow preparse.py is not happy. Any ideas?

edit retag flag offensive close merge delete

Comments

Was Sage installed using aptitude (apt-get install sagemath)?

slelievre gravatar imageslelievre ( 2019-04-17 09:23:05 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2019-04-17 09:22:55 +0200

slelievre gravatar image

It seems Python is missing the module called six.

Solve this by running one of the following in a terminal:

sudo pip install six  # to install system-wide
pip install --user six  # to install for this user only

Note that the latest version of Sage (currently 8.7) can be downloaded for Ubuntu from

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-04-15 18:51:24 +0200

Seen: 891 times

Last updated: Apr 17 '19