首页 > 其他 > 详细

pip命令

时间:2019-05-27 22:19:05      阅读:158      评论:0      收藏:0      [点我收藏+]

原文链接地址:https://pip.pypa.io/en/latest/user_guide/

如果python3则自带安装pip,不需要单独安装。

  • pip安装包
$ pip install SomePackage
[...]
Successfully installed SomePackage
$ pip install SomePackage            # latest version
$ pip install SomePackage==1.0.4     # specific version
$ pip install SomePackage>=1.0.4     # minimum version
  • pip从其他地方获取包
$ pip install SomePackage-1.0-py2.py3-none-any.whl
[...]
Successfully installed SomePackage
pip install -r requirements.txt
pip freeze > requirements.txt
  • pip显示安装的包
$ pip show --files SomePackage
Name: SomePackage
Version: 1.0
Location: /my/env/lib/pythonx.x/site-packages
Files:
  ../somepackage/__init__.py
  [...]
$ pip list
docutils (0.9.1)
Jinja2 (2.6)
Pygments (1.5)
Sphinx (1.1.2)
  • pip列出过时包
$ pip list --outdated
SomePackage (Current: 1.0 Latest: 2.0)
  • 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
  • pip卸载包
$ pip uninstall SomePackage
Uninstalling SomePackage:
  /my/env/lib/pythonx.x/site-packages/somepackage
Proceed (y/n)? y
Successfully uninstalled SomePackage

pip命令

原文:https://www.cnblogs.com/wuyuan2011woaini/p/10933521.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!