Using Alibaba cloud server , Use pip When installing the third-party library, the card will die . So I thought pip Can I install the local package .
Found this blog :
install sudo easy_install pip
List installed packages pip freeze or pip list
export requirements.txtpip freeze > < Catalog >/requirements.txt
Installation package
Online installation pip install < Package name > or pip install -r requirements.txt
By using == >= <= > < To specify the version , If not, install the latest version
requirements.txt The content format is :
APScheduler2.1.2
Django1.5.4
MySQL-Connector-Python2.0.1
MySQL-python1.2.3
PIL1.1.7
South1.0.2
django-grappelli2.6.3
django-pagination1.0.7
Install the local installation package
pip install < Catalog >/< file name > or pip install --use-wheel --no-index --find-links=wheelhouse/ < Package name >
< Package name > There is a space before
It can be abbreviated as
pip install --no-index -f=< Catalog >/ < Package name >
Uninstall package pip uninstall < Package name > or pip uninstall -r requirements.txt
Upgrade package pip install -U < Package name >
or :pip install < Package name > --upgrade
upgrade pippip install -U pip
Displays the directory where the package is located pip show -f < Package name >
Search package pip search < Search for keywords >
Query upgradeable packages pip list -o
Download package without installing pip install < Package name > -d < Catalog > or pip install -d < Catalog > -r requirements.txt
pack pip wheel < Package name >
Replace domestic pypi Mirror image
At home pypi Mirror image
Ali :https://mirrors.aliyun.com/pypi/simple
University of science and technology of China :http://pypi.mirrors.ustc.edu.cn/simple/
Specify a single install source pip install < Package name > -i https://mirrors.aliyun.com/pypi/simple
Specify global installation source
stay unix and macos, The configuration file is :$HOME/.pip/pip.conf
stay windows On , The configuration file is :%HOME%\pip\pip.ini
[global]
timeout = 6000
index-url = https://mirrors.aliyun.com/pypi/simple
Reproduced in https://www.cnblogs.com/xueweihan/p/4981704.html
https://me.iblogc.com/2015/01/01/pip%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/
High quality resource sharing