<commit_before>.. highlightlang:: none

.. _using-on-windows:

********************************
 Using Python on Unix platforms
********************************

.. sectionauthor:: <NAME>


Getting and installing the latest version of Python
===================================================

On Linux
--------

Python comes preinstalled on most Linux distributions, and is available as a
package on all others.  However there are certain features you might want to use
that are not available on your distro's package.  You can easily compile the
latest version of Python from source.
	
In the event Python doesn't come preinstalled and isn't in the repositories as
well, you can easily make packages for your own distro.  Have a look at the
following links:

.. seealso::

   http://www.linux.com/articles/60383
      for Debian users
   http://linuxmafia.com/pub/linux/suse-linux-internals/chapter35.html
      for OpenSuse users
   http://docs.fedoraproject.org/drafts/rpm-guide-en/ch-creating-rpms.html
      for Fedora users
   http://www.slackbook.org/html/package-management-making-packages.html
      for Slackware users


On FreeBSD and OpenBSD
----------------------

* FreeBSD users, to add the package use::

     pkg_add -r python

* OpenBSD users use::

     pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/<insert your architecture here>/python-<version>.tgz 
	
  For example i386 users get the 2.5.1 version of Python using::

     pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/i386/python-2.5.1p2.tgz


On OpenSolaris
--------------

To install the newest Python versions on OpenSolaris, install blastwave
(http://www.blastwave.org/howto.html) and type "pkg_get -i python" at the
prompt.


Building Python
===============

If you want to compile CPython yourself, first thing you should do is get the
`source <http://python.org/download/source/>`_. You can download either the
latest release's source or just grab a fresh `checkout
<http://www.python.org/dev/faq/#how-do-i-get-a-checkout-of-the-repository-read-only-and-read-write>`_.

The build process consists the usual ::

   ./configure
   make
   make install

invocations. Configuration options and caveats for specific Unix platforms are
extensively documented in the :file:`README` file in the root of the Python
source tree.
<commit_msg>Added warning that make install may overwrite or masquerade the default python binary. Use make altinstall instead. A native English speaker may want to rephrase the paragraph. ;)<commit_after>.. highlightlang:: none

.. _using-on-windows:

********************************
 Using Python on Unix platforms
********************************

.. sectionauthor:: <NAME>


Getting and installing the latest version of Python
===================================================

On Linux
--------

Python comes preinstalled on most Linux distributions, and is available as a
package on all others.  However there are certain features you might want to use
that are not available on your distro's package.  You can easily compile the
latest version of Python from source.
	
In the event Python doesn't come preinstalled and isn't in the repositories as
well, you can easily make packages for your own distro.  Have a look at the
following links:

.. seealso::

   http://www.linux.com/articles/60383
      for Debian users
   http://linuxmafia.com/pub/linux/suse-linux-internals/chapter35.html
      for OpenSuse users
   http://docs.fedoraproject.org/drafts/rpm-guide-en/ch-creating-rpms.html
      for Fedora users
   http://www.slackbook.org/html/package-management-making-packages.html
      for Slackware users


On FreeBSD and OpenBSD
----------------------

* FreeBSD users, to add the package use::

     pkg_add -r python

* OpenBSD users use::

     pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/<insert your architecture here>/python-<version>.tgz 
	
  For example i386 users get the 2.5.1 version of Python using::

     pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/i386/python-2.5.1p2.tgz


On OpenSolaris
--------------

To install the newest Python versions on OpenSolaris, install blastwave
(http://www.blastwave.org/howto.html) and type "pkg_get -i python" at the
prompt.


Building Python
===============

If you want to compile CPython yourself, first thing you should do is get the
`source <http://python.org/download/source/>`_. You can download either the
latest release's source or just grab a fresh `checkout
<http://www.python.org/dev/faq/#how-do-i-get-a-checkout-of-the-repository-read-only-and-read-write>`_.

The build process consists the usual ::

   ./configure
   make
   make install

invocations. Configuration options and caveats for specific Unix platforms are
extensively documented in the :file:`README` file in the root of the Python
source tree.

.. warning::
   ``make install`` can overwrite or masquerade the :file:`python` binary;
   ``make altinstall`` is recommended instead of ``make install`` since it
   only install :file:`{exec_prefix}/bin/python{version}`.

{'fraction_non_alphanumeric': 0.14941618840292895, 'fraction_numerical': 0.009499307342172967, 'mean_word_length': 3.6113138686131387, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '761989', 'n_tokens_mistral': 1527, 'n_tokens_neox': 1391, 'n_words': 524}