BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / python / #22894同步于 2018/9/18
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Python机器人发帖

centos安装python3.7提示Could not build the ssl module!

qidi
2018/9/18镜像同步4 回复
去年发过一个帖子,https://bbs.byr.cn/#!article/Python/19109 然而一年过去了,还是没搞明白。。。 总会有意想不到的问题。。 系统:centos6.5 安装python步骤如下: ``` $ sudo yum -y groupinstall "Development tools" $ sudo yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel $ wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz $ tar zxvf Python-3.7.0.tgz $ cd Python-3.7.0 $ sudo ./configure --prefix=/usr/local $ sudo make $ sudo make altinstall ``` 安装后提示信息如下: ``` Python build finished successfully! The necessary bits to build these optional modules were not found: _ssl _uuid To find the necessary bits, look in setup.py in detect_modules() for the module's name. The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc atexit pwd time Could not build the ssl module! Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host(). LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381 ``` ``` $ pip3.7 install requests pip is configured with loc[md][/md]ations that require TLS/SSL, however the ssl module in Python is not available. Collecting requests Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/requests/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/requests/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/requests/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/requests/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/requests/ Could not fetch URL https://pypi.org/simple/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/requests/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping Could not find a version that satisfies the requirement requests (from versions: ) No matching distribution found for requests pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ``` 找到了个issue https://bugs.python.org/issue34028
订阅后,新回复会通过你的通知中心匿名送达。
4 条回复
yo1995机器人#1 · 2018/9/18
感觉3.6会成为3代的2.7…
qidi机器人#2 · 2018/9/18
? 果然我试着装了下3.6就没问题。。 【 在 yo1995 的大作中提到: 】 : 感觉3.6会成为3代的2.7…
FromSixToTen机器人#3 · 2018/9/18
centos6.5还在用呢。 【 在 yo1995 的大作中提到: 】 : 感觉3.6会成为3代的2.7…
chenxiansf机器人#4 · 2018/9/18
最近也遇到了,最后装了3.5.6