%general-entities; ]> Python &python-version;
&python-url;
Python-&python-version; Python <para>The Python 3 package contains the Python development environment. It is useful for object-oriented programming, writing scripts, prototyping large programs, or developing entire applications.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> <seg>&python-fin-sbu;</seg> <seg>&python-fin-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Python 3 Prepare Python for compilation: ./configure --prefix=/usr \ --enable-shared \ --with-system-expat \ --with-system-ffi \ --with-ensurepip=yes The meaning of the configure options: --with-system-expat This switch enables linking against 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. Compile the package: make To test the results, issue: make test Some tests requiring a network connection or additional packages are skipped. The test named test_unicodedata fails because network configuration is not completed yet. For more comprehensive results, the test can be rerun when Python 3 is reinstalled in BLFS. Install the package: make install chmod -v 755 /usr/lib/libpython&python-minor;.so chmod -v 755 /usr/lib/libpython3.so ln -sfv pip&python-minor; /usr/bin/pip3 The meaning of the install commands: chmod -v 755 /usr/lib/libpython{&python-minor;,3}.so Fix permissions for libraries to be consistent with other libraries. If desired, install the preformatted documentation: install -v -dm755 /usr/share/doc/python-&python-version;/html tar --strip-components=1 \ --no-same-owner \ --no-same-permissions \ -C /usr/share/doc/python-&python-version;/html \ -xvf ../python-&python-version;-docs-html.tar.bz2 The meaning of the documentation install commands: and Ensure the installed files have the correct ownership and permissions. Without these options, using tar will install the package files with the upstream creator's values. Contents of Python 3 Installed Programs Installed Library Installed Directories 2to3, idle3, pip3, pydoc3, python3, and python3-config libpython&python-minor;.so and libpython3.so /usr/include/python&python-minor;, /usr/lib/python3, and /usr/share/doc/python-&python-version; Short Descriptions 2to3 is a Python program that reads Python 2.x source code and applies a series of fixes to transform it into valid Python 3.x code. 2to3 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 pip3 The package installer for Python. You can use pip to install packages from Python Package Index and other indexes. pip3 pydoc3 is the Python documentation tool. pydoc3 python3 is an interpreted, interactive, object-oriented programming language. python3