Jump to navigation Jump to search
- pip is the package installer for Python. You can use pip to install packages from the Python Package Index and other indexes.
- pip is already installed if you are using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from python.org or if you are working in a Virtual Environment created by virtualenv or pyvenv. Just make sure to upgrade pip.
- pip is a command line program. When you install pip, a pip command is added to your system, which can be run from the command prompt as follows:
$ pip <pip arguments>
- If you cannot run the pip command directly (possibly because the location where it was installed isn’t on your operating system’s PATH) then you can run pip via the Python interpreter:
$ python -m pip <pip arguments>
- On Windows, the py launcher can be used:
$ py -m pip <pip arguments>
- Even though pip is available from your Python installation as an importable module, via import pip, it is not supported to use pip in this way. For more details, see Using pip from your program.
- pip supports installing from PyPI, version control, local projects, and directly from distribution files.
- The most common scenario is to install from PyPI using Requirement Specifiers
$ pip install SomePackage # latest version $ pip install SomePackage==1.0.4 # specific version $ pip install 'SomePackage>=1.0.4' # minimum version
- For more information and examples, see the pip install reference.