pip命令
pip的意思是破蛋而出,继承了python的思维,呵呵~python的包有以egg命名的,意思是蛇蛋,如此便自然而然的明白如此命名的原因。
pip用来安装和管理python包的命令,可以代替easy_install。
用法:
1、安装python包
$ pip install simplejson
[... progress report ...]
Successfully installed simplejson
2、升级包
$ pip install --upgrade simplejson
[... progress report ...]
Successfully installed simplejson
3、删除包
$ pip uninstall simplejson
Uninstalling simplejson:
/home/me/env/lib/python2.7/site-packages/simplejson
/home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info
Proceed (y/n)? y
Successfully uninstalled simplejson
4、从指定文件中安装指定的包、模块
pip install -r requirements.txt
requirements.txt中的格式是:
django-coverage==1.2.2
django-permissions==1.0.3
django-workflows==1.0.2
django==1.3.1
MySQL-python==1.2.3
python-krbV==1.0.90
South==0.7.5
关于pip的更多详细信息,请见http://www.pip-installer.org/en/latest/