First time here? Check out the FAQ!

Ask Your Question
1

Why does Sage use its own build of Python interpreter

asked 4 years ago

greatpet gravatar image

updated 4 years ago

slelievre gravatar image

Why can't I install Sage as a package in an existing Python environment, when every other Python package can be used in this way? How is Sage's bundled Python interpreter different from a normal Python interpreter?

Preview: (hide)

Comments

Welcome to Ask Sage! Thank you for your question.

slelievre gravatar imageslelievre ( 4 years ago )

The question would be easier to answer with an indication of

  • the operating system
  • the existing Python environment (from the operating system's package distribution? from Conda? other?)
slelievre gravatar imageslelievre ( 4 years ago )

The usual spelling is Sage rather than SAGE.

slelievre gravatar imageslelievre ( 4 years ago )

1 Answer

Sort by » oldest newest most voted
2

answered 4 years ago

slelievre gravatar image

updated 4 years ago

You ask:

Why can't I install Sage as a package in an existing Python environment

In fact you can, in many cases.

Sage is a huge Python library with many non-Python dependencies.

Historically, the way to make all these dependencies work together was to provide a complete distribution.

Tremendous effort has since been put into modularising it and packaging it for various distributions.

In Arch, Conda, Debian, Fedora, Gentoo, Guix, Nix, and other distributions, you can install Sage to work with the distribution's Python.

Modularisation efforts are ongoing to make Sage even more modular and easier to install for an existing Python installation.

This work is tracked at

Preview: (hide)
link

Comments

That's nice to here! I was under the impression (probably mistakenly) that SAGE required python to be compiled with non-standard gcc flags different from a normal python build. Is it possible for SAGE to work with Python3 from the package manager of Ubuntu 20.04?

greatpet gravatar imagegreatpet ( 4 years ago )
1

Sage works with a very standard Python

When building Sage from source, one can decide to use the system Python or to build Python.

To install Sage for your system's Python with your system's package manager, run this in a terminal:

sudo apt install sagemath sagemath-jupyter sagemath-doc

or install these packages using the Ubuntu package manager application.

slelievre gravatar imageslelievre ( 4 years ago )

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

Seen: 903 times

Last updated: Mar 19 '21