You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're familiar with Python packaging and installation, and just want to know
what tools are currently recommended, then here it is.
Installation Tool Recommendations
Use :ref:`pip` to install Python :term:`packages <Distribution Package>` from
:term:`PyPI <Python Package Index (PyPI)>`. [1][2]
Use :ref:`virtualenv`, or pyvenv to isolate application specific
dependencies from a shared Python installation. [3]
Use pip wheel to create a
cache of :term:`wheel` distributions, for the purpose of speeding up
subsequent installations. [4]
If you're looking for management of fully integrated cross-platform software
stacks, consider :ref:`buildout` (primarily focused on the web development
community) or :ref:`hashdist`, or :ref:`conda` (both primarily focused on
the scientific community).
Packaging Tool Recommendations
Use :ref:`setuptools` to define projects and create :term:`Source Distributions
<Source Distribution (or "sdist")>`. [5][6]
Use the bdist_wheel :ref:`setuptools` extension available from the
:ref:`wheel project <wheel>` to create :term:`wheels <Wheel>`. This is
especially beneficial, if your project contains binary extensions. [7]
Use twine for uploading distributions
to :term:`PyPI <Python Package Index (PyPI)>`.
There are some cases where you might choose to use easy_install (from
:ref:`setuptools`), e.g. if you need to install from :term:`Eggs <Egg>`
(which pip doesn't support). For a detailed breakdown, see :ref:`pip vs
easy_install`.
The acceptance of :ref:`PEP453 <pypa:PEP453s>` means that :ref:`pip`
will be available by default in most installations of Python 3.4 or
later. See the rationale section from :ref:`PEP453
<pypa:PEP453s>` as for why pip was chosen.
Beginning with Python 3.4, pyvenv will create virtualenv environments
with pip installed, thereby making it an equal alternative to
:ref:`virtualenv`. However, using :ref:`virtualenv` will still be
recommended for users that need cross-version consistency.
Although you can use pure distutils for many projects, it does not
support defining dependencies on other projects and is missing several
convenience utilities for automatically populating distribution metadata
correctly that are provided by setuptools. Being outside the
standard library, setuptools also offers a more consistent feature
set across different versions of Python, and (unlike distutils),
setuptools will be updated to produce the upcoming "Metadata 2.0"
standard formats on all supported versions.
Even for projects that do choose to use distutils, when :ref:`pip`
installs such projects directly from source (rather than installing
from a prebuilt :term:`wheel <Wheel>` file), it will actually build
your project using :ref:`setuptools` instead.
:term:`PyPI <Python Package Index (PyPI)>` currently only allows
uploading Windows and Mac OS X wheels, and they should be compatible with
the binary installers provided for download from python.org. Enhancements
will have to be made to the :ref:`wheel compatibility tagging scheme
<pypa:PEP425s>` before linux wheels will be allowed.