环境说明
系统版本:win10 64
python版本:2.7.14
安装步骤
1、安装easy_intall
下载https://pypi.python.org/pypi/ez_setup,解压缩后用管理员打开cmd窗口,切换到easy_install的目录,然后通过python ez_setup.py进行安装
Microsoft Windows [版本 10.0.15063](c) 2017 Microsoft Corporation。保留所有权利。C:\WINDOWS\system32>cd C:\Users\xiaohu\Downloads\ez_setup-0.9\ez_setup-0.9C:\Users\xiaohu\Downloads\ez_setup-0.9\ez_setup-0.9>python ez_setup.pyExtracting in c:\users\xiaohu\appdata\local\temp\tmprciqrwNow working in c:\users\xiaohu\appdata\local\temp\tmprciqrw\distribute-0.6.14Installing DistributeBefore install bootstrap.Scanning installed packages..........Installed c:\program files\python27\lib\site-packages\distribute-0.6.14-py2.7.eggProcessing dependencies for distribute==0.6.14Finished processing dependencies for distribute==0.6.14After install bootstrap.Creating C:\Program Files\Python27\Lib\site-packages\setuptools-0.6c11-py2.7.egg-infoCreating C:\Program Files\Python27\Lib\site-packages\setuptools.pth
2、安装pip
下载,选择tar.gz的包,解压后用管理员打开cmd窗口,切换到pip的目录,然后通过python setup.py install进行安装
C:\Users\xiaohu\Downloads\ez_setup-0.9\ez_setup-0.9>cd C:\Users\xiaohu\Downloads\pip-9.0.1\pip-9.0.1C:\Users\xiaohu\Downloads\pip-9.0.1\pip-9.0.1>python setup.py installC:\Program Files\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg)running installinstall_dir C:\Program Files\Python27\Lib\site-packages\.......Installing pip2.exe script to C:\Program Files\Python27\ScriptsInstalled c:\program files\python27\lib\site-packages\pip-9.0.1-py2.7.eggProcessing dependencies for pip==9.0.1Finished processing dependencies for pip==9.0.1
3、测试
C:\Users\xiaohu\Downloads\pip-9.0.1\pip-9.0.1>pip -Vpip 9.0.1 from C:\Program Files\Python27\lib\site-packages\pip-9.0.1-py2.7.egg (python 2.7)
备注:使用cmd的时候一定要用管理员方式打开,否则会报错,导致安装失败。