python安装途中遇到的问题和解决方法

一、setuptools安装错误:RuntimeError: Compression requires the (missing) zlib module

1. 描述

搞了个腾讯云的服务器,闲在手上没事准备当个测试机用用,写写代码什么的。然后按照之前写的文章安装了python2.7,安装的中途出现了一个错误:

其实错误一眼就能看出是缺少了zlib库,然后使用yum install zlib zlib-devel安装了库之后python setup.py install 发现还是一样报错。

2. 解决方法

装好zlib相关库之后把把python重新安装一遍,进入到源码目录:

二、setuptools错误:pkg_resources.DistributionNotFound: The "distribute==0.6.10" distribution was not found and is required by the application    [2017-10-21添加]

1. 描述

安装完setuptools准备使用时报错:

2. 解决方法

缺少distribute模块,使用pip安装也装不上,需要在官网下载源码安装。

三、pip报错:pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.    [2017-10-21添加]

1. 错误描述

使用pip安装shadowsocks的时候报错:

2. 解决方法

系统缺少openssl-devel包,使用yum install openssl-devel安装。

然后重新安装python:进入python源码目录,make && make install,解决。

原文地址:https://www.cnblogs.com/xiaowenshu/p/10239851.html