python安装easy_intall和pip

环境说明

系统版本: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.9

C:\Users\xiaohu\Downloads\ez_setup-0.9\ez_setup-0.9>python ez_setup.py
Extracting in c:\users\xiaohu\appdata\local\temp\tmprciqrw
Now working in c:\users\xiaohu\appdata\local\temp\tmprciqrw\distribute-0.6.14
Installing Distribute
Before install bootstrap.
Scanning installed packages
..........
Installed c:\program files\python27\lib\site-packages\distribute-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 Files\Python27\Lib\site-packages\setuptools-0.6c11-py2.7.egg-info
Creating C:\Program Files\Python27\Lib\site-packages\setuptools.pth

2、安装pip

下载https://pypi.python.org/pypi/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.1

C:\Users\xiaohu\Downloads\pip-9.0.1\pip-9.0.1>python setup.py install
C:\Program Files\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
running install
install_dir C:\Program Files\Python27\Lib\site-packages\
.......
Installing pip2.exe script to C:\Program Files\Python27\Scripts

Installed c:\program files\python27\lib\site-packages\pip-9.0.1-py2.7.egg
Processing dependencies for pip==9.0.1
Finished processing dependencies for pip==9.0.1

3、测试

C:\Users\xiaohu\Downloads\pip-9.0.1\pip-9.0.1>pip -V
pip 9.0.1 from C:\Program Files\Python27\lib\site-packages\pip-9.0.1-py2.7.egg (python 2.7)

备注:使用cmd的时候一定要用管理员方式打开,否则会报错,导致安装失败。

猜你喜欢

转载自blog.csdn.net/jihu0412/article/details/80175757