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. sqlserver权限体系(下)

    简介 在上一篇文章中,我对主体的概念做了全面的阐述.本篇文章接着讲述主体所作用的安全对象以及所对应的权限. 理解安全对象(Securable) 安全对象,是SQL Server 数据库引擎授权系统控制 ...

  2. linux下svn的命令

    原文地址:http://www.cnblogs.com/wanqieddy/archive/2011/06/09/2076783.html

  3. .NET4.0 __doPostBack未定义

    方法一.浏览器设置成兼容模式. 方法二.安装服务器版的.Net40的补丁.http://download.csdn.net/detail/5653325/6642051 方法三.点击VS的工具菜单-- ...

  4. Orchard源码分析(4.2):Orchard.Logging.LoggingModule类

    与CollectionOrderModule一样,LoggingModule也是一个Autofac模块.它以属性注入的方式给需要日志服务的对象设置Logger.    如果一个类有Orchard.Lo ...

  5. p命名空间的使用(不推荐用)

    xmlns:p="http://www.springframework.org/schema/p" p:没有xsd文件,直接加上面那句就好了 <!-- singleton和p ...

  6. mongodb 基本用法大全

    1>给数据库添加用户名密码    db.addUser("xxx","yyy") 2>

  7. Eclipse里项目名有红叉,但是底下的每一个文件都没有红叉

    如果是因为java compiler level does not match the version of the installed java, 那么我们打开项目的properties,有一个选项 ...

  8. 使用cachemanager做缓存(Session的缓存)

    1.我在这里直接用 cachemanager.redis 往redis里面存储缓存数据2.步骤 1)下载CacheManager.Redis(包含了CacheManager.Core) 下载Stack ...

  9. firefox的plugin-container.exe进程如何关闭?

    为什么要关闭container进程? 查看firefox所消耗的资源: ff本身: cpu一般是0-10%, 内存一般是400MB左右 plugin-container: cpu所占的比例很高, 可达 ...

  10. shell编程中的select用法

    select 语句 select表达式是bash的一种扩展应用,擅长于交互式场合.用户可以从一组不同的值中进行选择: select var in ... ; do break; done .... n ...