在centos 7编译安装了Python 3.6后,用pip3安装virtualenv会报错:
[root@vps ~]# pip3 install virtualenv
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting virtualenv
Could not fetch URL https://pypi.python.org/simple/virtualenv/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement virtualenv (from versions: )
No matching distribution found for virtualenv
原因是可能你的openssl没装好。
[root@vps ~]# yum install openssl openssl-devel
装好后重新编译Python就可以了。
还有如果出现按退格键出现乱码的这种情况(或者方向键)
Python 3.6.0 (default, Jan 23 2017, 14:14:34)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> dddd^H^H^H
那么需要安装readline
[root@vps ~]# yum install readline-devel readline
然后重新编译即可
本文解决在CentOS7环境下编译安装Python3.6后使用pip3安装virtualenv时遇到的错误。详细介绍了如何通过安装openssl和openssl-devel解决TLS/SSL配置问题,以及安装readline解决输入退格键乱码的问题。
496

被折叠的 条评论
为什么被折叠?



