pip (package manager)
pip is a de facto standard package-management system used to install and manage software packages written in Python.[4] Many packages can be found in the default source for packages and their dependencies — Python Package Index (PyPI).[5]
![]() An output of pip --help | |
Original author(s) | Ian Bicking |
---|---|
Initial release | 4 April 2011[1] |
Stable release | 20.2
/ 29 July 2020[2] |
Repository | ![]() |
Written in | Python |
Operating system | OS-independent |
Platform | Python |
Type | Package management system |
License | MIT[3] |
Website | pip |
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 (pip3 for Python 3) by default.[6]
First introduced as pyinstall in 2008 by Ian Bicking (the creator of the virtualenv package) as an alternative to easy_install,[7][8] pip was chosen as the new name from one of several suggestions that the creator received on his blog post.[9] According to Bicking himself, the name is an acronym for "Pip Installs Packages".[10] 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.[8]
Command-line interface
![](../I/m/Pip_install_virtualenv.png)
pip install virtualenv
One major advantage of pip is the ease of its command-line interface, which makes installing Python software packages as easy as issuing a command:
pip install some-package-name
Users can also easily remove the package:
pip uninstall some-package-name
Most importantly pip has a feature to manage full lists of packages and corresponding version numbers, possible through a "requirements" file.[5] 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[11], where requirements.txt
is the name of the file:
pip install -r requirements.txt
Install some package for a specific version python, where ${version}
is replaced for 2, 3, 3.4, etc.:
pip${version} install some-package-name
See also
References
- Release 1.0
- "Release Notes". Retrieved 30 July 2020.
- "pip/LICENSE.txt". Github. 17 April 2018. Archived from the original on 1 June 2018. Retrieved 1 June 2018.
- Kollár, László. "Managing Python packages the right way". Opensource.com. Red Hat. Retrieved 23 June 2019.
- "pip documentation". The pip developers. Retrieved 5 January 2012.
- "pip installation". Retrieved 24 February 2015.
- Bicking, Ian (24 September 2008). "pyinstall: A New Hope". Archived from the original on 27 September 2008. Retrieved 4 March 2020.
- "Packaging History". Python Packaging Authority. Retrieved 4 March 2020.
- Bicking, Ian (1 October 2008). "pyinstall pybundles". Retrieved 4 March 2020.
- Bicking, Ian (28 October 2008). "pyinstall is dead, long live pip!". Retrieved 4 March 2020.
- Gahlot, Gaurav (6 November 2018). "Most Important pip Commands for a Python Developer - DZone Open Source". dzone.com. Retrieved 23 June 2019.