pip (also known by Python 3's alias pip3) is a package manager (package management system) written in Python and is used to install and manage software packages. The Python Software Foundation recommends using pip to install Python applications and its dependencies during deployment. Pip connects to an online software repository of public packages, named the Python Package Index (PyPI). Pip can be configured to connect to other package repositories (local or remote), provided that they comply to Python Enhancement Proposal 503.
Most distributions of Python come with pip preinstalled. Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include pip by default.
First introduced as pyinstall in 2008 by Ian Bicking (the creator of the virtualenv package) as an alternative to easy install, pip was chosen as the new name from one of several suggestions that the creator received on his blog post. According to Bicking himself, the name is a recursive acronym for "Pip Installs Packages". In 2011, the Python Packaging Authority (PyPA) was created to take over the maintenance of pip and virtualenv from Bicking, led by Carl Meyer, Brian Rosner, and Jannis Leidel.
With the release of pip version 6.0 (2014-12-22), the version naming process was changed to have version in X.Y format and drop the preceding 1 from the version label.
Pip's command-line interface allows the install of Python software packages by issuing a command: <code>pip install some-package-name</code>
Users can also remove the package by issuing a command: <code>pip uninstall some-package-name</code>
pip has a feature to manage full lists of packages and corresponding version numbers, possible through a "requirements" file. This permits the efficient re-creation of an entire group of packages in a separate environment (e.g. another computer) or virtual environment. This can be achieved with a properly formatted file and the following command, where requirements.txt is the name of the file: <code>pip install -r requirements.txt</code>.
To install some package for a specific python version, pip provides the following command, where <code>${version}</code> is replaced by 2, 3, 3.4, etc.: <code>pip${version} install some-package-name</code>.
Pip provides a way to install user-defined projects locally with the use of a file. This method requires the Python project to have the following file structure: example_project/ âÂÂâÂÂâ exampleproject/ Python package with source code. | âÂÂâÂÂâ __init__.py Make the folder a package. | âÂÂâÂÂâ example.py Example module. âÂÂâÂÂâ README.md README with info of the project. Within this structure, user can add to the root of the project (i.e. for above structure) with the following content:
After this, pip can install this custom project by running the following command, from the project root directory: <code>pip install -e</code>.
Besides the default Python Package Index (PyPI) repository, pip supports custom repositories also. Such repositories can be located on a Hypertext Transfer Protocol HTTP(s) URL, or on a file system.
A custom repository can be specified using the or option, thusly: <code>pip install -i <nowiki>https://your-custom-repo/simple</nowiki> <package name></code>; or with a filesystem: <code>pip install -i /path/to/your/custom-repo/simple <package name></code>.