ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 19 Mar 2021 20:22:53 +0100Why does Sage use its own build of Python interpreterhttps://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/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?Fri, 19 Mar 2021 14:34:29 +0100https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/Comment by slelievre for <p>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?</p>
https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?comment=56273#post-id-56273The usual spelling is Sage rather than SAGE.Fri, 19 Mar 2021 20:22:53 +0100https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?comment=56273#post-id-56273Comment by slelievre for <p>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?</p>
https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?comment=56261#post-id-56261The 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?)Fri, 19 Mar 2021 17:29:49 +0100https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?comment=56261#post-id-56261Comment by slelievre for <p>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?</p>
https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?comment=56260#post-id-56260Welcome to Ask Sage! Thank you for your question.Fri, 19 Mar 2021 17:29:20 +0100https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?comment=56260#post-id-56260Answer by slelievre for <p>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?</p>
https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?answer=56262#post-id-56262You 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
- [Sage Trac ticket 29705: Meta-ticket: Modularize sagelib into separate distributions (pip-installable packages) sagemath-...](https://trac.sagemath.org/ticket/29705)Fri, 19 Mar 2021 17:37:16 +0100https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?answer=56262#post-id-56262Comment by slelievre for <p>You ask:</p>
<blockquote>
<p>Why can't I install Sage as a package in an existing Python environment</p>
</blockquote>
<p>In fact you can, in many cases.</p>
<p>Sage is a huge Python library with many non-Python dependencies.</p>
<p>Historically, the way to make all these dependencies work together
was to provide a complete distribution.</p>
<p>Tremendous effort has since been put into modularising it
and packaging it for various distributions.</p>
<p>In Arch, Conda, Debian, Fedora, Gentoo, Guix, Nix, and other
distributions, you can install Sage to work with the distribution's Python.</p>
<p>Modularisation efforts are ongoing to make Sage even more modular
and easier to install for an existing Python installation.</p>
<p>This work is tracked at</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/29705">Sage Trac ticket 29705: Meta-ticket: Modularize sagelib into separate distributions (pip-installable packages) sagemath-...</a></li>
</ul>
https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?comment=56272#post-id-56272Sage 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.Fri, 19 Mar 2021 20:21:48 +0100https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?comment=56272#post-id-56272Comment by greatpet for <p>You ask:</p>
<blockquote>
<p>Why can't I install Sage as a package in an existing Python environment</p>
</blockquote>
<p>In fact you can, in many cases.</p>
<p>Sage is a huge Python library with many non-Python dependencies.</p>
<p>Historically, the way to make all these dependencies work together
was to provide a complete distribution.</p>
<p>Tremendous effort has since been put into modularising it
and packaging it for various distributions.</p>
<p>In Arch, Conda, Debian, Fedora, Gentoo, Guix, Nix, and other
distributions, you can install Sage to work with the distribution's Python.</p>
<p>Modularisation efforts are ongoing to make Sage even more modular
and easier to install for an existing Python installation.</p>
<p>This work is tracked at</p>
<ul>
<li><a href="https://trac.sagemath.org/ticket/29705">Sage Trac ticket 29705: Meta-ticket: Modularize sagelib into separate distributions (pip-installable packages) sagemath-...</a></li>
</ul>
https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?comment=56266#post-id-56266That'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?Fri, 19 Mar 2021 18:22:23 +0100https://ask.sagemath.org/question/56250/why-does-sage-use-its-own-build-of-python-interpreter/?comment=56266#post-id-56266