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,解決。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM