pip安装使用详解
#yum install wget
#wget 'https://bootstrap.pypa.io/get-pip.py'
#python get-pip.py
#pip install pyopenssl ndg-httpsclient pyasn1
#pip install 'requests[security]'
#wget https://pypi.python.org/packages/2.7/c/chardet/chardet-2.2.1-py2.py3-none-any.whl --no-check-certificate
md5sum chardet-2.2.1-py2.py3-none-any.whl
pip install chardet-2.2.1-py2.py3-none-any.whl
使用详解
1、pip安装软件
# pip install SomePackage
[...]
Successfully installed SomePackage
2、pip查看已安装的软件
复制代码
# pip show --files SomePackage
Name: SomePackage
Version: 1.0
Location: /my/env/lib/pythonx.x/site-packages
Files:
../somepackage/__init__.py
[...]
复制代码
3、pip检查哪些软件需要更新
# pip list --outdated
SomePackage (Current: 1.0 Latest: 2.0)
4、pip升级软件
复制代码
# pip install --upgrade SomePackage
[...]
Found existing installation: SomePackage 1.0
Uninstalling SomePackage:
Successfully uninstalled SomePackage
Running setup.py install for SomePackage
Successfully installed SomePackage
复制代码
5、pip卸载软件
$ pip uninstall SomePackage
Uninstalling SomePackage:
/my/env/lib/pythonx.x/site-packages/somepackage
Proceed (y/n)? y
Successfully uninstalled SomePackage
pip --help