Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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
click to hide/show revision 2
No.2 Revision

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