%general-entities; ]> $LastChangedBy$ $Date$ 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 optional modules are needed. &lfs10_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &python3-md5sum; Download size: &python3-size; Estimated disk space required: &python3-buildsize; Estimated build time: &python3-time; Python 3 Dependencies Recommended (required if building firefox or thunderbird) Optional , (required for some tests), , and libmpdec Optional (For Additional Modules) and User Notes: Installation of Python 3 Install Python 3 by running the following commands: CXX="/usr/bin/g++" \ ./configure --prefix=/usr \ --enable-shared \ --with-system-expat \ --with-system-ffi \ --with-ensurepip=yes && make To test the result, issue make test. Some tests may need Internet connection. 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. --with-system-ffi: This switch enables linking against system version of libffi. --with-ensurepip=yes : This switch enables building pip and setuptools packaging programs. setuptools is needed for building some Python modules. : Use this switch if you want to build Python DBM Module against Berkeley DB instead of GDBM. : Use this switch if you want to enable expensive optimizations (i.e. Profile Guided Optimizations). This adds around 20 SBU, but can slightly speed up some uses, such as using Sphinx for creating documentation, or use of Python3 scripts. : 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. Configuring Python 3 In order for python3 to find the installed documentation, create the following version independent symlink: ln -svfn python-&python3-version; /usr/share/doc/python-3 and add the following environment variable to the individual user's or system's profile: export PYTHONDOCS=/usr/share/doc/python-3/html Contents Installed Programs Installed Libraries Installed Directories 2to3 (symlink) and 2to3-&python3-majorver;, easy_install-&python3-majorver;, idle3 (symlink) and idle&python3-majorver;, pip3 (symlink) and pip&python3-majorver;, pydoc3 and pydoc&python3-majorver;, python3 (symlink); python&python3-majorver;, and python3 (symlink), and python&python3-majorver; python3-config (symlink) and python&python3-majorver;-config libpython&python3-majorver;.so and libpython3.so /usr/include/python&python3-majorver;, /usr/lib/python&python3-majorver;, and /usr/share/doc/python-&python3-version; Short Descriptions easy_install is a frontend to pip3 to make it easier to configure python modules through the PIP package manager easy_install 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;