python 安装pip 命令_pip 安装命令

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:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值