您的位置:首页 > 运维架构 > Linux

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

2015-05-26 15:59 716 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: