带有 Python 2.7 的 Ubuntu Maverick:
我不知道如何解决以下导入错误:
>>> 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
ImportError: No module named _ssl
更新: 我重新编译了源代码。我无法弄清楚如何在下面提到的答案中添加 --with-ssl 选项,而是通过编辑 /Modules/Setup.dist 中有关 SSL 的行来实现这一点。