本文由stackoverflow相关问题整理而来,具体链接如下:
https://stackoverflow.com/questions/54175042/python-3-7-anaconda-environment-import-ssl-dll-load-fail-error
安装 Anaconda3 Python3.7 后,使用自带的 Anaconda Prompt 运行 import ssl 时,无异常报错。 但是在PyCharm中使用 Python Console 解释器时,报错如下:
......
File "C:\Program Files\JetBrains\PyCharm\helpers\third_party\thriftpy\_shaded_thriftpy\transport\sslsocket.py", line 7, in <module>
import ssl
File "C:\Users\abhil\AppData\Local\Continuum\anaconda3\envs\HeisenbergPy37\lib\ssl.py", line 98, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: DLL load failed: The specified module could not be found.
Process finished with exit code 1
解决方案: 从 Anaconda3\Library\bin 中复制如下文件到 Anaconda3\DLLs:
- libcrypto-1_1-x64.dll
- libssl-1_1-x64.dll
来源:oschina
链接:https://my.oschina.net/k8king/blog/4274743