导入_ssl错误,DLL加载失败,Python 37 Anaconda Windows 10。

5
我在Win10上遇到了_ssl问题。 我已经将Python包和代码从Windows 7移植到Windows 10。一开始我遇到了以下问题:

ImportError:缺少必需的依赖项['numpy']

但通过重新安装numpy和pandas的.whl包,这个问题得到了解决。

目前,当我执行代码时,我遇到了以下问题:

import _ssl             # if we can't import it, let the error propagate
    ImportError: DLL load failed: The specified procedure could not be found. 

参考了Stack Overflow上的其他问题并尝试了几个步骤:

  1. 根据Python 3.7 anaconda environment - import _ssl DLL load fail error中的建议更改了路径变量。

  2. 安装了pyopenssl。

  3. 更新了系统环境变量。

  4. 重新启动了PyCharm。

目前在Anaconda提示符上显示为:

   (base) C:\>
   (base) C:\>python
    Python 3.7.0 (default, Aug 14 2018, 19:12:50) [MSC v.1900 32 bit 
    (Intel)] :: Ana
     conda, Inc. on win32
     Type "help", "copyright", "credits" or "license" for more 
     information.
   >>> import ssl
  >>> import _ssl
  >>>

这意味着_ssl.pyd文件没有问题。 这在Windows 7上运行得非常好,但在Windows 10上不行。

请问您能解释一下"merged the code"是什么意思吗? - pedro_bb7
这个回答解决了你的问题吗?Python 3.7 anaconda环境 - import _ssl DLL load fail error - Hagbard
2个回答

3

我不确定这个Pycharm bug的当前状态。但是在提出这个问题时,粘贴DLL文件并没有帮助。后来我看到了一个论坛帖子,在回答中提到了它。将Python解释器从3.7降级到3.6有所帮助。 - rose
以下是有关编程的内容,请将链接 https://youtrack.jetbrains.com/issue/PY-27234 作为参考。 - rose

0

根据Pycharm论坛post的说法,这是一个已知问题,将在下一个Pycharm 2019.1版本中修复。唯一解决此问题的方法是使用Python 3.6创建一个环境。如果您将该环境用作解释器,则PyCharm应该可以正常工作。

干杯!


1
@Hagbard 供您参考。 - rose

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接