1. pip download and install
pip download
Go to https://pypi.python.org/pypi/pip and download the .tar.gz compressed package
Linux installation pip
# tar -xzvf pip-1.5.4.tar.gz unzip # cd pip-1.5.4 enter the unzip file # python setup.py install installation
Upgrade pip
python -m pip install --upgrade pip
2. Detailed use of pip
pip installation package
# pip install Install package name [...] Successfully installed SomePackage #Installed successfully
pip to see if it is installed
# Pip show --files installation package name Name: SomePackage # package name Version: 1.0 # version Location: /my/env/lib/pythonx.x/site-packages # installation location Files: # include files and so on ../ somepackage / __ init__.py [...]
pip check which packages need to be updated
# pip list --outdated
pip upgrade package
# pip install --upgrade package name to upgrade
Package name The currently installed version number The latest version number
pip uninstall package
# pip uninstall package name to uninstall
3. Examples of pip use
Install redis
# pip install redis
Uninstall redis
# pip uninstall redis Uninstalling redis: /usr/lib/python3.6/site-packages/redis-2.9.1-py3.6.egg-info ......... Proceed (y/n)? y Successfully uninstalled redis # 卸载成功
pip parameter explanation
Chinese (can be copied and extracted):
# pip --help
Usage: pip <command> [options] Commands: install install packages. Uninstall uninstall packages. Freeze outputs a list of installed packages in a certain format list lists installed packages. Show displays package details. Search Search packages, similar to those in yum search. wheel makes wheels according to your requirements. zip is not recommended. Compress individual packages. unzip is not recommended. Unzip individual packages. bundle is not recommended. create pybundles. help current help. GeneralOptions: -h, --help show help. -v , --verbose For more output, you can use up to 3 times -V, --version Actual version information and then exit. -q, --quiet The least output --log-file <path> Overwrite to record verbose error log, default file: /root/.pip/pip.log --log <path> Do not overwrite log recording verbose output. --proxy <proxy> with the following The form specifies aproxy: [user: passwd @] proxy.server: port. --Timeout <sec> Connection timeout (default 15 seconds). --Exists-action <action> The default action when the path already exists: (switch, (Ignore, (w) ipe, (backup). --Cert <path> certificate.
English (picture):