centos 6.5t升级python注意事顶及遇到问题的解决方法

1. 安装依赖包

必须安装的二个依赖: zlib-devel, openssl-devel


如果没有安装zlib-devel这个出错,容易看出来。但openssl-devel没安装的话,出错很难看出来。 现像见后文。


2. 源码编译安装python 

 https://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz

3. 源码编译安装setuptools

https://pypi.python.org/packages/source/s/setuptools/setuptools-16.0.tar.gz


4. 使用easy_install 安装pip

 easy_install pip


出错现像及解决方法:

Searching for pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: unknown url type: https -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: unknown url type: https -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')


解决方法:

  安装openssl-devel包,然后重新安装python

你可能感兴趣的:(centos 6.5t升级python注意事顶及遇到问题的解决方法)