标签:
1、先到官网 http://pypi.python.org/pypi/setuptools 下载setuptools.exe文件并安装
2、安装完毕后建议把D:\Python27\Scripts添加到path环境变量,再使用easy_install pip命令安装pip
C:\windows\system32>easy_install pip Searching for pip Best match: pip 1.5.6 Processing pip-1.5.6-py2.7.egg pip 1.5.6 is already the active version in easy-install.pth Installing pip-script.py script to D:\Python27\Scripts Installing pip.exe script to D:\Python27\Scripts Installing pip.exe.manifest script to D:\Python27\Scripts Installing pip2.7-script.py script to D:\Python27\Scripts Installing pip2.7.exe script to D:\Python27\Scripts Installing pip2.7.exe.manifest script to D:\Python27\Scripts Installing pip2-script.py script to D:\Python27\Scripts Installing pip2.exe script to D:\Python27\Scripts Installing pip2.exe.manifest script to D:\Python27\Scripts Using d:\python27\lib\site-packages\pip-1.5.6-py2.7.egg Processing dependencies for pip Finished processing dependencies for pip
通过豆瓣源安装python第三方requests类库
C:\windows\system32>pip install requests -i http://pypi.douban.com/simple/ Downloading/unpacking requests http://pypi.douban.com/simple/requests/ uses an insecure transport scheme (htt p). Consider using https if pypi.douban.com has it available Installing collected packages: requests Successfully installed requests Cleaning up...
pip的其他用法:
pip install -U 包名(类requests) -- 更新requests类库
pip unintsll 包名(类requests) -- 删除requests类库
pip search 包名(类requests) -- 搜索requests类库
pip help
比如:手动安装requests
标签:
原文地址:http://www.cnblogs.com/dtest/p/4507980.html