windows server 2016 ‘Can't connect to HTTPS URL because the SSL module is not available’错误

在服务器用IDE运行正常,外部访问调用在requests模块出现错误:Can't connect to HTTPS URL because the SSL module is not available

 

这是python的dll搜索路径的问题

 

解决:github上的解决办法:

CondaHTTPError: Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available) · Issue #6064 · conda/conda (github.com)

到这里main/win-64 (anaconda.com)

下载对应版本的更新并安装

conda install c:\Users\you\Downloads\python-3.7.2-h8c8aaf0_2.tar.bz2

 

第2个办法:

Can't connect to HTTPS URL because the SSL module is not available · Issue #8273 · conda/conda (github.com)

将这些文件(所有扩展名的):

libcrypto-1_1-x64.*
libssl-1_1-x64.*

\Anaconda3\Library\bin

复制到

\Anaconda3\DLLs

 

我用了第2个办法解决了,第1个好像是官方人员发的,但没试过

 

posted @ 2021-05-10 17:01  shang的学习园地  阅读(686)  评论(0)    收藏  举报