List installed Packages
pip freeze
or pip list
Export Requirements.txt
pip freeze > <目录>/requirements.txt
installation package Online Installation
pip install <包名>
or pip install -r requirements.txt
Specify the version by using = = >= <= > <, and install the latest version without writing
The Requirements.txt content format is:
Apscheduler==2.1.2django==1.5. 4mysql-connector-python==2.0. 1mysql-python==1.2. 3pil==1.1. 7south==1.0. 2django-grappelli==2.6. 3django-pagination==1.0. 7
Install the Local installation package
pip install <目录>/<文件名>
or pip install --use-wheel --no-index --find-links=wheelhouse/ <包名>
< package name > previous space
can be shortened to
pip install --no-index -f=<目录>/ <包名>
Uninstalling packages
pip uninstall <包名>
or pip uninstall -r requirements.txt
Upgrade Package
pip install -U <包名>
Or: Pip Install < package name >--upgrade
Upgrade Pip
pip install -U pip
Show the directory where the package resides
pip show -f <包名>
Search Packages
pip search <搜索关键字>
Querying packages that can be upgraded
pip list -o
Download the package without installing
pip install <包名> -d <目录>
or pip install -d <目录> -r requirements.txt
Packaged
pip wheel <包名>
Replacement of domestic pypi mirror domestic pypi Mirror
- V2ex:pypi.v2ex.com/simple
- Watercress: Http://pypi.douban.com/simple
- China University of Science and Technology: http://pypi.mirrors.ustc.edu.cn/simple/
Refers to the order of the secondary installation source
pip install <包名> -i http://pypi.v2ex.com/simple
Specify the global installation source
In Unix and MacOS, the configuration file is: $HOME/.pip/pip.conf
On Windows, the configuration file is:%home%\pip\pip.ini
[global]timeout = 6000 index-url = http://pypi.douban.com/simple
Reference Source: http://www.cnblogs.com/xueweihan/p/4981704.html
Python installs multiple packages/PIP usage