python3,7 Can't connect to HTTPS URL because the SSL module is not available.
时间: 2023-12-03 07:39:47 浏览: 105
解决安装python3.7.4报错Can''t connect to HTTPS URL because the SSL module is not available
在Python3.7之后的版本,依赖的openssl,必须要是1.1或者以上版本,否则会出现Can't connect to HTTPS URL because the SSL module is not available错误。解决办法如下:
1.安装最新版的OpenSSL:
```shell
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
tar -zxvf openssl-1.1.1d.tar.gz
cd openssl-1.1.1d
./config
make && make install
```
2.重新编译Python3.7.4:
```shell
./configure --with-openssl=/usr/local/ssl
make && make install
```
3.升级pip3:
```shell
pip3 install --upgrade pip
```
阅读全文