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 pip to install Python packages from PyPI.  
- Use virtualenv, or pyvenv to isolate application specific dependencies from a shared Python installation. 
- Use pip wheel to create a cache of wheel distributions, for the purpose of speeding up subsequent installations. 
- If you’re looking for management of fully integrated cross-platform software stacks, consider buildout (primarily focused on the web development community) or Hashdist, or conda (both primarily focused on the scientific community).
Packaging Tool Recommendations¶
- Use setuptools to define projects and create Source Distributions.  
- Use the bdist_wheel setuptools extension available from the wheel project to create wheels. This is especially beneficial, if your project contains binary extensions. 
- Use twine for uploading distributions to PyPI.
|||There are some cases where you might choose to use easy_install (from setuptools), e.g. if you need to install from Eggs (which pip doesn’t support). For a detailed breakdown, see pip vs easy_install.|
|||The acceptance of PEP453 means that pip will be available by default in most installations of Python 3.4 or later. See the rationale section from PEP453 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 virtualenv. However, using virtualenv will still be recommended for users that need cross-version consistency.|
|||For more information, see the pip guide to Installing from Wheels.|
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 pip installs such projects directly from source (rather than installing from a prebuilt wheel file), it will actually build your project using setuptools instead.
|||distribute (a fork of setuptools) was merged back into setuptools in June 2013, thereby making setuptools the default choice for packaging.|
|||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 wheel compatibility tagging scheme before linux wheels will be allowed.|