使用了这么就pip命令,但是一直是简单使用,很多命令都是用了查,查了用,今天把常用的命令汇总一下,方便使用。

命令:

pip

由上图可以看到 pip 支持一下命令

Commands:

install Install packages.

download Download packages.

uninstall Uninstall packages.

freeze Output installed packages in requirements format.

list List installed packages.

show Show information about installed packages.

check Verify installed packages have compatible dependencies.

search Search PyPI for packages.

wheel Build wheels from your requirements.

hash Compute hashes of package archives.

completion A helper command used for command completion.

help Show help for commands.

General Options:

-h, --help Show help.

--isolated Run pip in an isolated mode, ignoring

environment variables and user configuration.

-v, --verbose Give more output. Option is additive, and can be

used up to 3 times.

-V, --version Show version and exit.

-q, --quiet Give less output. Option is additive, and can be

used up to 3 times (corresponding to WARNING,

ERROR, and CRITICAL logging levels).

--log Path to a verbose appending log.

--proxy Specify a proxy in the form

[user:passwd@]proxy.server:port.

--retries Maximum number of retries each connection should

attempt (default 5 times).

--timeout Set the socket timeout (default 15 seconds).

--exists-action Default action when a path already exists:

(s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.

--trusted-host Mark this host as trusted, even though it does

not have valid or any HTTPS.

--cert Path to alternate CA bundle.

--client-cert Path to SSL client certificate, a single file

containing the private key and the certificate

in PEM format.

--cache-dir

--no-cache-dir Disable the cache.

--disable-pip-version-check

Don't periodically check PyPI to determine

whether a new version of pip is available for

download. Implied with --no-index.

1、install

pip install

You must give at least one requirement to install (see "pip help install")

所以这里可以直接使用一下命令实现在线安装

pip install <包名> 或 pip install -r requirements.txt

通过使用== >= <= > <来指定版本,不写则安装最新版

requirements.txt内容格式为:

APScheduler==2.1.2

Django==1.5.4

MySQL-Connector-Python==2.0.1

MySQL-python==1.2.3

PIL==1.1.7

South==1.0.2

django-grappelli==2.6.3

django-pagination==1.0.7

安装本地安装包

pip install <目录>/<文件名> 或 pip install --use-wheel --no-index --find-links=wheelhouse/ <包名>

2、uninstall

卸载安装包

pip uninstall <包名> 或 pip uninstall -r requirements.txt

升级包

pip install -U <包名>

或:pip install <包名> --upgrade

升级pip

pip install -U pip

使用pip安装插件的时候报错:

You are using pip version 8.1.1, however version 9.0.1 is available.

You should consider upgrading via the 'python -m pip install --upgrade pip' command.

升级命令: python -m pip install --upgrade pip

3、freeze

pip freeze,查看已经安装的包及版本信息。

导出到指定文件中,如图,注意 “ > ”,文件名称随意。常见按第二种写法。

4、list

查询可升级的包

pip list -o

5、show

显示包所在目录及信息

6、search

搜索包

pip search <搜索关键字>

以上就是Python pip 常用命令汇总的详细内容,更多关于Python pip 常用命令的资料请关注脚本之家其它相关文章!

python常用命令大全-Python pip 常用命令汇总相关推荐

  1. linux命令大全chm版本,Linux命令大全手册下载

    linux命令大全chm版是精心修改版,去除了官方原版的许多错误,以及未来得及更新的部分,实用性很强,对于正在掌握linux系统的程序员们来说,是开发之前必须学会的东西,操作方便.检测迅速,举一反三靠 ...

  2. 今天给大家分享电脑cmd命令大全,使用cmd命令可以高效的对电脑进行配置或者快速打开自己需要的服务,有需要的朋友赶紧收藏吧!

    今天给大家分享电脑cmd命令大全,使用cmd命令可以高效的对电脑进行配置或者快速打开自己需要的服务,有需要的朋友赶紧收藏吧! 功能说明 cmd命令 组策略 gpedit.msc 控制面板 contro ...

  3. python语言命令大全-Python常用命令最全合集

    文章目录 一.Python环境配置命令 二.Python 常用命令 三.pip管理工具命令 四.发布包到pypi(官网)命令 Mac 电脑自带python2.x版本,终端输入 python -V // ...

  4. python常用代码大全-Python常用库大全及简要说明

    环境管理 管理 Python 版本和环境的工具 p:非常简单的交互式 python 版本管理工具.官网 pyenv:简单的 Python 版本管理工具.官网 Vex:可以在虚拟环境中执行命令.官网 v ...

  5. python常用代码大全-Python常用库大全

    Python常用库大全,看看有没有你需要的. 环境管理 管理 Python 版本和环境的工具 p – 非常简单的交互式 python 版本管理工具. pyenv – 简单的 Python 版本管理工具 ...

  6. python常用代码大全-Python常用库大全,看看有没有你需要的

    环境管理 管理 Python 版本和环境的工具 p – 非常简单的交互式 python 版本管理工具. pyenv – 简单的 Python 版本管理工具. Vex – 可以在虚拟环境中执行命令. v ...

  7. Xshell常用命令大全(附常用实例)

    Xshell常用命令大全 Xshell常用命令 cd-更改目录 cp-复制文件 cat-显示文件内容 diff-比较文件内容 find-查找文件 grep-搜索文件内容 head-查看文件的名字和后缀 ...

  8. python 代码命令大全-Python列表操作大全(非常全)

    Python列表操作大全(非常全!!!) 对于python列表的理解可以和C语言里面的数组进行比较性的记忆与对照,它们比较相似,对于python里面列表的定义可以直接用方括号里加所包含对象的方法,并且 ...

  9. python基础代码大全-python基础语法,python 代码命令大全

    python: 1.语法强制缩进 2.区分大小写:iLoop与iloop是两个变量 3.变量无需申明,但是变量赋值前无法使用:a=3合法,b=a+3合法,b=a+c不合法,因为c未赋值前不能使用 4. ...

最新文章

  1. 汇编语言程序设计 实验九
  2. 面试高频题:单链表的逆置操作/链表逆序
  3. python3.6小程序_python3.6小程序
  4. 不显示调用super_super关键字
  5. oracle导入dmp方法,oracle dmp文件导入方法
  6. 【嵌入式开发】 Bootloader 详解 ( 代码环境 | ARM 启动流程 | uboot 工作流程 | 架构设计)
  7. Java机器学习库ML之十模型选择准则AIC和BIC
  8. Java实现返回的数据为树形结构
  9. PHP源码分析-PHP的生命周期
  10. 通过Dapr实现一个简单的基于.net的微服务电商系统(六)——一步一步教你如何撸Dapr之Actor服务...
  11. html 页面重复度高,html – CSS背景渐变重复问题
  12. java导出文件excle报错Failed to read zip entry source
  13. 美团点评Java一二面过,三面“凉凉”~复习备战“金三春招季
  14. 五月,温暖,风带着花香沁人心脾,独坐窗前
  15. iPhone开发入门(一)
  16. think.php教程,Thinkphp_thinkphp教程_自学php网
  17. 靶机渗透练习57-digitalworld.local:JOY
  18. Android 自定义Dialog 里面有EditText控件点击关闭输入法失效的问题
  19. html-canvas-绘制简单线条
  20. 5.26——工作记录

热门文章

  1. 安全领域应该关注的网站
  2. JVM优化之调整大内存分页(LargePage)
  3. 最新的ES 5.0路由算法底层实现
  4. [SHOI2015]自动刷题机
  5. 使用netfilter_queue改包笔记
  6. 2012.3.17庆祝我的博客创建!名字是web-sheena
  7. 最短路径算法——Dijkstra and Floyd算法
  8. PHP做下载文件的方法
  9. Java applet java.lang.OutOfMemoryError: Java heap space
  10. 羊皮卷的实践-第二十一章