版权声明:本文为博主原创文章,转载请注明出处 https://blog.csdn.net/vkingnew/article/details/86289391
C:\Windows\System32>pip --version
pip 18.1 from c:\dev\python36\lib\site-packages\pip (python 3.6)
C:\Windows\System32>python --version
Python 3.6.6
pip软件的升级:
python -m pip install --upgrade pip
--pip命令:
C:\Windows\System32>pip --help
Usage:
pip <command> [options]
Commands:
install 安装包.
uninstall 卸载包.
freeze 按着一定格式输出已安装包列表
list 列出已安装包.
show 显示包详细信息.
search 搜索包,类似yum里的search.
wheel Buildwheelsfromyourrequirements.
zip 不推荐.Zipindividualpackages.
unzip 不推荐.Unzipindividualpackages.
bundle 不推荐.Createpybundles.
help 当前帮助.
GeneralOptions:
-h,--help 显示帮助.
-v,--verbose 更多的输出,最多可以使用3次
-V,--version 现实版本信息然后退出.
-q,--quiet 最少的输出.
--log-file<path> 覆盖的方式记录verbose错误日志,默认文件:/root/.pip/pip.log
--log<path> 不覆盖记录verbose输出的日志.
--proxy<proxy> Specifyaproxyintheform[user:passwd@]proxy.server:port.
--timeout<sec> 连接超时时间(默认15秒).
--exists-action<action> Defaultactionwhenapathalreadyexists:(s)witch,(i)gnore,(w)ipe,(b)ackup.
--cert<path> 证书.
--软件安装位置查询:
C:\Windows\System32>pip show --files redis
Name: redis
Version: 2.10.6
-- 查询过期的软件:
C:\Windows\System32>pip list --outdated
Package Version Latest Type
---------------------- ----------- ---------- -----
alembic 0.8.10 1.0.5 sdist
beautifulsoup4 4.6.0 4.7.1 wheel
certifi 2017.7.27.1 2018.11.29 wheel
click 6.7 7.0 wheel
PyMySQL 0.7.11 0.9.3 wheel
-- 软件升级:
C:\Windows\System32>pip install --upgrade PyMySQL==0.9.3
Collecting PyMySQL==0.9.3
Downloading https://files.pythonhosted.org/packages/ed/39/15045ae46f2a123019aa968dfcba0396c161c20f855f11dea6796bcaae95/PyMySQL-0.9.3-py2.py3-none-any.whl (47kB)
100% |████████████████████████████████| 51kB 216kB/s
Installing collected packages: PyMySQL
Found existing installation: PyMySQL 0.7.11
Uninstalling PyMySQL-0.7.11:
Successfully uninstalled PyMySQL-0.7.11
Successfully installed PyMySQL-0.9.3
--软件的卸载:
C:\Windows\System32>pip install redis
Requirement already satisfied: redis in c:\dev\python36\lib\site-packages (2.10.6)
C:\Windows\System32>pip uninstall redis
Uninstalling redis-2.10.6:
Would remove:
c:\dev\python36\lib\site-packages\redis-2.10.6.dist-info\*
c:\dev\python36\lib\site-packages\redis\*
Proceed (y/n)? y
Successfully uninstalled redis-2.10.6