Lines Matching +full:python +full:- +full:version
3 .. _using-on-unix:
6 Using Python on Unix platforms
12 Getting and installing the latest version of Python
16 --------
18 Python comes preinstalled on most Linux distributions, and is available as a
21 latest version of Python from source.
23 In the event that Python doesn't come preinstalled and isn't in the repositories as
29 https://www.debian.org/doc/manuals/maint-guide/first.en.html
33 …https://docs-old.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-creating…
35 http://www.slackbook.org/html/package-management-making-packages.html
40 ----------------------
48 pkg_add -r python
50 …ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/<insert your architecture here>/python-<version>.tgz
52 For example i386 users get the 2.5.1 version of Python using::
54 pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/i386/python-2.5.1p2.tgz
58 --------------
60 You can get Python from `OpenCSW <https://www.opencsw.org/>`_. Various versions
61 of Python are available and can be installed with e.g. ``pkgutil -i python27``.
64 .. _building-python-on-unix:
66 Building Python
70 `source <https://www.python.org/downloads/source/>`_. You can download either the
72 <https://devguide.python.org/setup/#getting-the-source-code>`_. (If you want
81 :ref:`Configuration options <configure-options>` and caveats for specific Unix
83 root of the Python source tree.
89 since it only installs :file:`{exec_prefix}/bin/python{version}`.
92 Python-related paths and files
97 are installation-dependent and should be interpreted as for GNU software; they
102 +-----------------------------------------------+------------------------------------------+
106 +-----------------------------------------------+------------------------------------------+
107 | :file:`{prefix}/lib/python{version}`, | Recommended locations of the directories |
108 | :file:`{exec_prefix}/lib/python{version}` | containing the standard modules. |
109 +-----------------------------------------------+------------------------------------------+
110 | :file:`{prefix}/include/python{version}`, | Recommended locations of the directories |
111 | :file:`{exec_prefix}/include/python{version}` | containing the include files needed for |
112 | | developing Python extensions and |
114 +-----------------------------------------------+------------------------------------------+
120 To easily use Python scripts on Unix, you need to make them executable,
123 .. code-block:: shell-session
132 which searches for the Python interpreter in the whole :envvar:`PATH`. However,
136 To use shell commands in your Python scripts, look at the :mod:`subprocess` module.
149 .. code-block:: shell-session
151 $ find /etc/ -name openssl.cnf -printf "%h\n"
158 .. code-block:: shell-session
160 $ curl -O https://www.openssl.org/source/openssl-VERSION.tar.gz
161 $ tar xzf openssl-VERSION
162 $ pushd openssl-VERSION
164 --prefix=/usr/local/custom-openssl \
165 --libdir=lib \
166 --openssldir=/etc/ssl
167 $ make -j1 depend
168 $ make -j8
172 3. Build Python with custom OpenSSL
173 (see the configure `--with-openssl` and `--with-openssl-rpath` options)
175 .. code-block:: shell-session
177 $ pushd python-3.x.x
178 $ ./configure -C \
179 --with-openssl=/usr/local/custom-openssl \
180 --with-openssl-rpath=auto \
181 --prefix=/usr/local/python-3.x.x
182 $ make -j8
188 to recompile Python to update OpenSSL. It's sufficient to replace the
189 custom OpenSSL installation with a newer version.