pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index (PyPI).

Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include pip (pip3 for Python 3) by default.

pip is a recursive acronym that can stand for either “Pip Installs Packages” or “Pip installs Python”.

  • installation

for linux(debian):

$ sudo apt-get install python-pip

or

$ sudo curl -O https://bootstrap.pypa.io/get-pip.py | python
  • basic commands

    • help

      $ pip –help

    • install

      $ pip install threadpool   # latest version

      $ pip install threadpool=1.2.7  # specific version

      $ pip install threadpool>=1.2.7 # minimum version

      $ pip install SomePackage-1.0-py2.py3-none-any.whl  # Installing from Wheels

    • uninstall

      $ pip uninstall threadpool

    • search

      $ pip search threadpool

  • configuration mirrors

    On Unix and Mac OS X the configuration file is: $HOME/.pip/pip.conf

    On Windows, the configuration file is: $HOME\pip\pip.ini

    pip.conf

      [global]
      timeout=60
      index-url = https://pypi.mirrors.ustc.edu.cn/simple
    

    Note: you can set a custom path location for the config file using the environment variable PIP_CONFIG_FILE.

     export PIP_CONFIG_FILE="/etc/pip/pip.ini"
    

References