7.10. Python-3.11.4

The Python 3 package contains the Python development environment. It is useful for object-oriented programming, writing scripts, prototyping large programs, and developing entire applications. Python is an interpreted computer language.

Approximate build time: 0.4 SBU
Required disk space: 533 MB

7.10.1. Installation of Python

[Note]

Note

There are two package files whose name starts with python. The one to extract from is Python-3.11.4.tar.xz (notice the uppercase first letter).

Prepare Python for compilation:

./configure --prefix=/usr   \
            --enable-shared \
            --without-ensurepip

The meaning of the configure option:

--enable-shared

This switch prevents installation of static libraries.

--without-ensurepip

This switch disables the Python package installer, which is not needed at this stage.

Compile the package:

make
[Note]

Note

Some Python 3 modules can't be built now because the dependencies are not installed yet. The building system still attempts to build them however, so the compilation of some files will fail and the compiler message may seem to indicate fatal error. The message should be ignored. Just make sure the toplevel make command has not failed. The optional modules are not needed now and they will be built in Chapter 8.

Install the package:

make install

Details on this package are located in Section 8.51.2, “Contents of Python 3.”