【问题标题】:Module appears in module list but can't be imported [duplicate]模块出现在模块列表中但无法导入[重复]
【发布时间】:2013-04-30 01:34:42
【问题描述】:

我收到一个错误,因为 ssl 模块不可用

如果我从 python 解释器运行help('modules'),它会在此处列出

当我尝试从解释器中导入它时,我得到了

>>> import ssl

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/ssl.py", line 60, in <module>
    import _ssl             # if we can't import it, let the error propagate

【问题讨论】:

标签: python


【解决方案1】:

确保您已安装 openssl 软件包。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-10-22
    • 2021-11-19
    • 1970-01-01
    • 2015-07-24
    • 1970-01-01
    • 2018-10-21
    • 2021-09-25
    • 2021-04-13
    相关资源
    最近更新 更多