-
Overview
使用
requests
发送消息,出现如下错误:Can’t connect to HTTPS URL because the SSL module is not available.
请求的url并无问题,Linux端的运行也正常,只有Windows下面anaconda运行异常。
-
Solution
参考中3,4,5是比较常见的几种解释,于我情况无作用。
我的情况是采用Reference1中第二个答案:
# copy the files libcrypto-1_1-x64.* libssl-1_1-x64.* # from ~\anaconda3\Library\bin to ~\anaconda2\DLLs
如此可以解决问题,具体原因还是不太懂,主要是对ssl这个网络传输层面理解的不够深入。
-
References
- Requests (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”) Error in PyCharm requesting website
- Can’t connect to HTTPS URL because the SSL module is not available #8273
- python3使用requests模块发https请求,提示caused by ssl error, can’t connect to https url because the ssl module is not available
- 再开一贴,python使用requests库时,访问https的网站报错SSL module is not available
- python3遇到Can’t connect to HTTPS URL because the SSL module is not available.