Ask Your Question

Revision history [back]

Depending how you installed Sage, Sage's Python might not be the system Python.

Installing Python packages for one Python does not install them for the other one.

To install the desired package for Sage's Python:

sage --pip install python-ternary

Depending how you installed Sage, Sage's Python might not be the system Python.

Installing Python packages for one Python does not install them for the other one.

Beware also that there are two different packages on PyPI with similar names:

  • https://pypi.org/project/ternary/
  • https://pypi.org/project/python-ternary/

I think you want the second one.

To install the desired package for Sage's Python:

sage --pip install python-ternary

If you installed the other one, you may want to uninstall it:

sage --pip uninstall ternary