python3.7 pip安装类库报错:ssl module in Python is not available
[root@10-23-67-69 Python-3.7.0]# python3
Python 3.4.8 (default, Apr 9 2018, 11:43:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> 这里导入ssl成功,没有报错
[root@10-23-67-69 Python-3.7.0]# pip3 install numpy 这里安装numpy报没有ssl模块
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting numpy
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/numpy/
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/numpy/
怎么处理才能让pip安装类库不报错?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
pip3 install openssl -i https://mirrors.aliyun.com/pypi/simple/
操作系统需要安装一下ssl,比如centos
yum install openssl* -y
http://blog.51cto.com/1354442...
pip3 install openssl
试下检查一下第一步的 python3.4.8 与第二步的 pip3 是否在同一个 py 环境。