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. 微信jssdk录音功能开发记录

    原文地址:http://www.cnblogs.com/liujunyang/p/4962423.html

  2. Orchard源码分析(4.4):Orchard.Caching.CacheModule类

    概述 CacheModule也是一个Autofac模块.   一.CacheModule类 CacheModule将DefaultCacheManager注册为ICacheManager:       ...

  3. 两种html幻灯片效果

    650) this.width=650;" src="http://img1.51cto.com/attachment/201307/165757318.jpg" tit ...

  4. jq实现鼠标移动到 图片上放大,移开图片缩小效果(打算封装成插件)

    先看代码 <script> $(function() { $('div').mouseover(function() { $('img').animate({ opacity: '0.9' ...

  5. 详解CSS中clear属性both、left、right值的含义

    前几天一朋友在群里问clear:left的意思,我以为是简单的清除浮动问题,就让他百度"清除浮动",导致中间有点小误会.后来我按照他写的DEMO,发现我自己也没完全理解clear: ...

  6. 安装SQL Server 2012 『企业中文版』

    安装 SQL Server 前,请详细参阅:计划安装SQL Server2012需求详细http://www.cnblogs.com/chhuang/p/3623198.html 安装 SQL Ser ...

  7. 两个伪类下特有的属性 content

    更加具体的可以参考:https://developer.mozilla.org/zh-CN/docs/Web/CSS/content

  8. "A transport-level error has occurred when sending the request to the server,指定的网络名不在可用"的解决办法

    项目在外网服务器上运行的时候,遇到一个异常:"A transport-level error has occurred when sending the request to the ser ...

  9. Javascript高级程序设计——引用类型

    对象在javascript中被称为引用类型的值,而且有一些内置的引用类型可以创建特定的对象: 引用类型与传统面向对象中的程序设计的类相似,但实现不同: Object是一个基础类型,其他所有类型都从Ob ...

  10. H5案例分享:html5重力感应事件

    html5重力感应事件 一.手机重力感应图形分析 1.设备围绕z轴的旋转角度为α,α角度的取值范围在[0,360). 设备在初始位置,与地球(XYZ)和身体(XYZ)某个位置对齐. 设备围绕z轴的旋转 ...