如果是windows安装完成后,需要将'\Python27\Scripts\'加入系统环境变量
# coding=utf-8
import os
import urllib2
url='https://raw.github.com/pypa/pip/master/contrib/get-pip.py'
print 'load begin,please waite'
response=urllib2.urlopen(url)
with open('./download.py','w') as f:
f.write(response.read())
print 'load end'import download
download.main()print 'clear up'
filepath=['./download.py','./download.pyc']
try:
for path in filepath:
os.remove(path)
except :
passprint 'insall pip success,please add '\Python27\Scripts\' to u enveronment path'
本文python自动安装pip到此结束。其实根本就没有什么“假如”,每个人的人生都不可重新设计。小编再次感谢大家对我们的支持!