Ask Your Question

Revision history [back]

It seems your system is using python3 by default, which is unusual. What do the following commands answer:

 /usr/bin/env python --version

If it answers Python 3.x, then a possibility could be to use a virtual environment so that, locally, the default version is 2.7 as follows:

  • install the virtualenv package
  • create the virtual environment:

    virtualenv -p /usr/bin/python2.7 venv2.7
    
  • activate the virtualenv (don't forget the leading dot)

    . venv2.7/bin/activate
    
  • run your Sage commands

  • deactivate the virtualenv:

    deactivate