鍍金池/ 問答/Python  Linux  網(wǎng)絡安全/ python3.7 pip安裝類庫報錯:ssl module in Python

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安裝類庫不報錯?

回答
編輯回答
編輯回答
神曲

pip3 install openssl -i https://mirrors.aliyun.com/pypi/simple/

2017年7月3日 20:17
編輯回答
執(zhí)念

pip3 install openssl試下

2017年12月13日 17:24
編輯回答
若相惜

操作系統(tǒng)需要安裝一下ssl,比如centos yum install openssl* -y

2018年7月6日 07:04
編輯回答
陌璃

檢查一下第一步的 python3.4.8 與第二步的 pip3 是否在同一個 py 環(huán)境。

2017年1月11日 11:20