python3: The Python programming language#

Description#

By default, Sage will try to use system’s python3 to set up a virtual environment, a.k.a. venv rather than building a Python 3 installation from scratch.

Sage will accept versions 3.8.x to 3.10.x.

You can also use --with-python=/path/to/python3_binary to tell Sage to use /path/to/python3_binary to set up the venv. Note that setting up the venv requires a number of Python modules to be available within the Python in question. Currently, as of Sage 9.7, these modules are as follows: sqlite3, ctypes, math, hashlib, crypt, socket, zlib, distutils.core, ssl - they will be checked for by the configure script.

Use the configure option --without-system-python3 in case you want Python 3 built from scratch.

Upstream Contact#

https://www.python.org

Type#

standard

Dependencies#

Version Information#

package-version.txt:

3.11.1

Equivalent System Packages#

alpine: install the following packages: python3-dev

cygwin:

$ apt-cyg install python39-devel python-pip-wheel python-setuptools-wheel

Debian/Ubuntu:

$ sudo apt-get install  python3 libpython3-dev python3-distutils python3-venv

Fedora/Redhat/CentOS:

$ sudo yum install  python3-devel

freebsd:

$ sudo pkg install lang/python

homebrew:

$ brew install python3

macports: install the following packages: python39

opensuse:

$ sudo zypper install python3-devel

void:

$ sudo xbps-install  python3-devel

See https://repology.org/project/python/versions

If the system package is installed, ./configure will check whether it can be used.