%general-entities; ]> Python-&python3-version; Python3 Introduction to Python 3 The Python 3 package contains the Python development environment. This is useful for object-oriented programming, writing scripts, prototyping large programs or developing entire applications. Python 3 was installed in LFS. The only reason to rebuild it here is if is installed or if upgrading. If upgrading to a new Python-3 minor version (for example, from Python-3.11.x to Python-3.12.0), you will need to reinstall any Python3 modules you have installed. You should also reinstall packages that generate Python3 modules. Before you upgrade, you can get a list of modules installed with pip3 list. The list may be incomplete as some Python modules are not installed with pip3, for example the xcbgen module installed by . Use ls /usr/lib/python3.minor/site-packages for a comprehensive list. The Python modules from LFS will also have to be reinstalled: flit-core, wheel, setuptools, meson, MarkupSafe, and Jinja2. Download: Python 3 Dependencies Recommended (required if building Firefox or Thunderbird) Installation of Python 3 Install Python 3 by running the following commands: CXX="/usr/bin/g++" \ ./configure --prefix=/usr \ --enable-shared \ --with-system-expat \ --enable-optimizations && make Now, as the &root; user: make install Command Explanations CXX="/usr/bin/g++" ./configure ...: Avoid an annoying message during configuration. --with-system-expat: This switch enables linking against the system version of Expat. --enable-optimizations: This switch enables stable, but expensive, optimizations. : This optional switch enables thick Link Time Optimization. Unusually, it creates a much larger /usr/lib/python&python3-majorver;/config-&python3-majorver;-<arch>-linux-gnu/libpython&python3-majorver;.a with a small increase in the time to compile Python. Run-time results do not appear to show any benefit from doing this. Contents Installed Programs Installed Libraries Installed Directories idle3 (symlink) and idle&python3-majorver;, pip3 and pip&python3-majorver;, pydoc3 (symlink) and pydoc&python3-majorver;, python3 (symlink) and python&python3-majorver;, and python3-config (symlink) and python&python3-majorver;-config libpython&python3-majorver; and libpython3 /usr/include/python&python3-majorver; and /usr/lib/python&python3-majorver; Short Descriptions idle3 is a wrapper script that opens a Python aware GUI editor. For this script to run, you must have installed Tk before Python so that the Tkinter Python module is built idle3 pydoc3 is the Python documentation tool pydo3c python3 is an interpreted, interactive, object-oriented programming language python3 python&python3-majorver; is a version-specific name for the python program python&python3-majorver;