环境说明
系统版本: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:WINDOWSsystem32>cd C:UsersxiaohuDownloadsez_setup-0.9ez_setup-0.9 C:UsersxiaohuDownloadsez_setup-0.9ez_setup-0.9>python ez_setup.py Extracting in c:usersxiaohuappdatalocal emp mprciqrw Now working in c:usersxiaohuappdatalocal emp mprciqrwdistribute-0.6.14 Installing Distribute Before install bootstrap. Scanning installed packages .......... Installed c:program filespython27libsite-packagesdistribute-0.6.14-py2.7.egg Processing dependencies for distribute==0.6.14 Finished processing dependencies for distribute==0.6.14 After install bootstrap. Creating C:Program FilesPython27Libsite-packagessetuptools-0.6c11-py2.7.egg-info Creating C:Program FilesPython27Libsite-packagessetuptools.pth
2、安装pip
下载https://pypi.python.org/pypi/pip,选择tar.gz的包,解压后用管理员打开cmd窗口,切换到pip的目录,然后通过python setup.py install进行安装
C:UsersxiaohuDownloadsez_setup-0.9ez_setup-0.9>cd C:UsersxiaohuDownloadspip-9.0.1pip-9.0.1 C:UsersxiaohuDownloadspip-9.0.1pip-9.0.1>python setup.py install C:Program FilesPython27libdistutilsdist.py:267: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) running install install_dir C:Program FilesPython27Libsite-packages ....... Installing pip2.exe script to C:Program FilesPython27Scripts Installed c:program filespython27libsite-packagespip-9.0.1-py2.7.egg Processing dependencies for pip==9.0.1 Finished processing dependencies for pip==9.0.1
3、测试
C:UsersxiaohuDownloadspip-9.0.1pip-9.0.1>pip -V pip 9.0.1 from C:Program FilesPython27libsite-packagespip-9.0.1-py2.7.egg (python 2.7)
备注:使用cmd的时候一定要用管理员方式打开,否则会报错,导致安装失败。