pip官网文档

https://pip.pypa.io/en/latest/reference/pip.html

若没有将c:\Python27\Scripts加入到path环境变量,可以在c:\Python27\Scripts目录下执行pip命令。

常用命令

1. 列出已安装的package

c:\Python27\Scripts>pip list
PIL (1.1.7)
pip (1.5.6)
py2exe (0.6.9)
pywin32 (219)
selenium (2.45.0)
SendKeys (0.3)
setuptools (0.6c11)

2. 列出已过期的package

c:\Python27\Scripts>pip list --outdated
pip (Current: 1.5.6 Latest: 6.0.8)
py2exe (Current: 0.6.9 Latest: 0.9.2.2)
Could not find any downloads that satisfy the requirement pywin32
Some externally hosted files were ignored (use --allow-external pywin32 to allow
).
setuptools (Current: 0.6c11 Latest: 14.0)
Could not find any downloads that satisfy the requirement pil
Some externally hosted files were ignored (use --allow-external pil to allow).

3. 安装或升级某package的最新版本

c:\Python27\Scripts>pip install --upgrade selenium   或  pip install -U selenium
Downloading/unpacking selenium from https://pypi.python.org/packages/source/s/se
lenium/selenium-2.45.0.tar.gz#md5=120813af730474a62a5a13058da4f602
Running setup.py (path:c:\users\baifeng\appdata\local\temp\pip_build_baifeng\s
elenium\setup.py) egg_info for package selenium

Installing collected packages: selenium
Found existing installation: selenium 2.44.0
Uninstalling selenium:
Successfully uninstalled selenium
Running setup.py install for selenium

Successfully installed selenium
Cleaning up...

4.安装特定版本的包

安装特定版本的package,通过使用==, >=, <=, >, <来指定一个版本号。

pip install robotframework==2.9.2

pip install robotframework<3.0

5. 卸载

c:\Python27\Scripts>pip uninstall SomePackage

6. 查看某个库的信息:

c:\Python27\Scripts>pip show selenium

Metadata-Version: 1.1

Name: selenium
Version: 2.47.0
Summary: Python bindings for Selenium
Home-page: https://github.com/SeleniumHQ/selenium/
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Location: c:\python27\lib\site-packages
Requires:

pip 安装命令的更多相关文章

  1. Ubuntu下apt-get与pip安装命令的区别

    在ubuntu服务器下安装包的时候,经常会用到sudo apt-get install 包名 或 sudo pip install 包名,那么两者有什么区别呢? 1.区别pip用来安装来自PyPI(h ...

  2. pip安装命令集合

    先加速 使用清华大学镜像源(一定要用,会少很多坑) https://mirrors.tuna.tsinghua.edu.cn/help/alpine/ 超时加上参数  --default-timeou ...

  3. python︱模块加载(pip安装)以及pycharm安装与报错解决方式

    每每以为攀得众山小,可.每每又切实来到起点,大牛们,缓缓脚步来俺笔记葩分享一下吧,please~ --------------------------- 准备放下R开始学python,真是痛苦,因为找 ...

  4. Python 3.6.4 / win10 使用pip安装keras时遇到依赖的PyYAML安装出错

    PS C:\Users\myjac\Desktop\simple-chinese-ocr> pip install keras Collecting keras Downloading http ...

  5. python pip常用命令

    pip安装命令: pip install packagename pip显示模块版本号: pip show packagename pip卸载模块: pip uninstall packagename ...

  6. Linux - pip 安装使用说明

    简介 pip类似RedHat里面的yum,安装Python包非常方便.本节详细介绍pip的安装.以及使用方法 方案一 wget https://bootstrap.pypa.io/get-pip.py ...

  7. Windows命令行下pip安装python whl包

    因为做网页爬虫,需要用到一个爬新闻的BeautifulSoup 的包,然后再关网上下的是whl包,第一次装,虽然花了点时间,最后还是装上去了,记录一下,方便下次. 先发一下官方文档地址.http:// ...

  8. 命令行窗口中使用pip安装第三方库成功之后,在pycharm中仍不能使用

    在学习廖老师的Python教程的时候,遇到命令行窗口中使用pip安装第三方库成功之后,在pycharm中仍不能使用的情况, 这种情况可能是由于在本地安装了多个Python版本的缘故(只是可能的情况之一 ...

  9. pip安装django的时候提示没有这个命令

    问题描述: 在安装pyenv安装完python的时候,用pip安装django提示没有这个命令 [root@zabbix ~]# pip install django== 2.0 pyenv: pip ...

随机推荐

  1. Python Web Crawler

    Python版本:3.5.2 pycharm URL Parsing¶ https://docs.python.org/3.5/library/urllib.parse.html?highlight= ...

  2. asp.net mvc @Html.Partial @Html.Action @Html.RenderPartial @Html.RenderAction区别

    转载自 :  <asp.net mvc @Html.Partial @Html.Action @Html.RenderPartial @Html.RenderAction区别> 先复制过来 ...

  3. QT入门

    QT += core gui widgets //引入需要用到的库 qDebug()<<"t="<<t<<QTime::currentTime( ...

  4. 使用idea开发Springmvc

    使用IntelliJ IDEA开发SpringMVC网站(一)开发环境 http://my.oschina.net/gaussik/blog/385697?fromerr=A4EKE0Ix idea1 ...

  5. iOS-开启arc之后 NSNotificationCenter removeObserver 是否需要调用

    开启ARC之后,NSNotificationCenter removeObserver 是否需要调用,在何时调用? 今天在stackoverflow上面看到一个问题,arc情况下是否需要调用remov ...

  6. fedora配置网络

    网络配置包括3个部分: ipadd的配置 gateway profile dns profile 格式区别: 1和2的格式都是: CONFIG_ITEM = value; 3的格式是: nameser ...

  7. php去掉字符串的最后一个字符附substr()的用法

    转自:http://www.jb51.net/article/26604.htm 今天项目中用到,去掉字符串中的最后一个字符 原字符串1,2,3,4,5,6, 去掉最后一个字符"," ...

  8. hdu4982 Goffi and Squary Partition (DFS解法)

    BestCoder Round #6 B http://acm.hdu.edu.cn/showproblem.php?pid=4982 Goffi and Squary Partition Time ...

  9. jelq

    初级 The Newbie Routine 5 minutes hot wrap 5 minutes manual stretch (ten 30-second stretches) 10 minut ...

  10. KVM虚拟机内存不足,调整参数

    Dec :: vgfs001 kernel: tiotest_AMD_x86 invoked oom-killer: gfp_mask=, oom_adj=, oom_score_adj= Dec : ...