Jump to content

Pip (package manager)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 208.255.153.154 (talk) at 17:39, 5 September 2018 (Fixed typo). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Pip sucks

Command-line interface

An output of pip install virtualenv

Most distributions of Python come with pip preinstalled. If pip is missing, it can be installed through the system package manager or by invoking cURL, a client-side data transfer tool:

curl https://bootstrap.pypa.io/get-pip.py | python

One major advantage of pip is the ease of its command-line interface, which makes installing Python software packages as easy as issuing one 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.[1] 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 requirements.txt file and the following command:

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

  1. ^ Cite error: The named reference pip-docs was invoked but never defined (see the help page).