Ask Your Question
1

sagemath launch problems on Ubuntu

asked 5 years ago

Vasily Galchin gravatar image

updated 5 years ago

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?

Preview: (hide)

Comments

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

slelievre gravatar imageslelievre ( 5 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 5 years ago

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

Preview: (hide)
link

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: 5 years ago

Seen: 996 times

Last updated: Apr 17 '19