我的python版本号具体信息如下:
Python 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
python2.7没有自带pip工具,需要安装一个setuptools包,
我使用的python2.7与之对应的setuptools版本是setuptools-0.6c11,
然后才能安装与之对应的pip1.5.
去官网下载该文件的源码包,解压后,cmd进入里面的文件夹,运行:
python2 setup.py install
然后出现超长的文本,类似如下说明setuptools安装成功:
–
C:\Users\rkey\Downloads\setuptools-0.6c11>python2 setup.py install
running install
running bdist_egg
running egg_info
writing requirements to pip.egg-info\requires.txt
writing pip.egg-info\PKG-INFO
writing top-level names to pip.egg-info\top_level.txt
writing dependency_links to pip.egg-info\dependency_links.txt
writing entry points to pip.egg-info\entry_points.txt
reading manifest file ‘pip.egg-info\SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no files found matching ‘pip\cacert.pem’
warning: no files found matching ‘*.html’ under directory ‘docs’
warning: no previously-included files matching ‘*.rst’ found under directory ‘docs\_build’
no previously-included directories found matching ‘docs\_build\_sources’
writing manifest file ‘pip.egg-info\SOURCES.txt’
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build
creating build\lib
creating build\lib\pip
copying pip\basecommand.py -> build\lib\pip
copying pip\baseparser.py -> build\lib\pip
copying pip\cmdoptions.py -> build\lib\pip
copying pip\download.py -> build\lib\pip
copying pip\exceptions.py -> build\lib\pip
copying pip\index.py -> build\lib\pip
copying pip\locations.py -> build\lib\pip
copying pip\log.py -> build\lib\pip
copying pip\pep425tags.py -> build\lib\pip
…
Installing easy_install-2.7.exe script to C:\application\Python\Python27\Scripts
Installing easy_install-2.7.exe.manifest script to C:\application\Python\Python27\Scripts
Installed c:\application\python\python27\lib\site-packages\setuptools-0.6c11-py2.7.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11
–
然后下载并解压安装python2.7与之对应的pip源码包pip-1.5,进入里面的文件夹,运行:
python2 setup.py install
然后又出现超长的文本,类似如下,说明安装成功:
–
C:\Users\rkey\Downloads\pip-1.5>python2 setup.py install
running install
running bdist_egg
running egg_info
writing requirements to pip.egg-info\requires.txt
writing pip.egg-info\PKG-INFO
writing top-level names to pip.egg-info\top_level.txt
writing dependency_links to pip.egg-info\dependency_links.txt
writing entry points to pip.egg-info\entry_points.txt
reading manifest file ‘pip.egg-info\SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no files found matching ‘pip\cacert.pem’
warning: no files found matching ‘*.html’ under directory ‘docs’
warning: no previously-included files matching ‘*.rst’ found under directory ‘docs\_build’
no previously-included directories found matching ‘docs\_build\_sources’
writing manifest file ‘pip.egg-info\SOURCES.txt’
installing library code to build\bdist.win-amd64\egg
…
Adding pip 1.5 to easy-install.pth file
Installing pip-script.py script to C:\application\Python\Python27\Scripts
Installing pip.exe script to C:\application\Python\Python27\Scripts
Installing pip.exe.manifest script to C:\application\Python\Python27\Scripts
Installing pip2.7-script.py script to C:\application\Python\Python27\Scripts
Installing pip2.7.exe script to C:\application\Python\Python27\Scripts
Installing pip2.7.exe.manifest script to C:\application\Python\Python27\Scripts
Installing pip2-script.py script to C:\application\Python\Python27\Scripts
Installing pip2.exe script to C:\application\Python\Python27\Scripts
Installing pip2.exe.manifest script to C:\application\Python\Python27\Scripts
Installed c:\application\python\python27\lib\site-packages\pip-1.5-py2.7.egg
Processing dependencies for pip==1.5
Finished processing dependencies for pip==1.5
–