简体   繁体   English

转到Google App Engine教程:ImportError:没有名为_md5的模块

[英]Go tutorial for Google App Engine: ImportError: No module named _md5

I'm trying to run the hello world tutorial for the Google app engine in Go language. 我正在尝试使用Go语言运行Google应用引擎的hello world教程。 The GAE SDK for go is based on python 2.5, which I installed. 用于go的GAE SDK基于我安装的python 2.5。 I then had to install openssl, but now when I try to run my sample application on the SDK, I get the following error: 然后我必须安装openssl,但是现在当我尝试在SDK上运行我的示例应用程序时,我收到以下错误:

ImportError: No module named _md5

I even tried a simple import md5 & import hashlib from the python interpreter interface, and i still get the same error 我甚至从python解释器接口尝试了一个简单的导入md5和import hashlib,我仍然得到相同的错误

>>> import hashlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/hashlib.py", line 133, in <module>
md5 = __get_builtin_constructor('md5')
File "/usr/local/lib/python2.5/hashlib.py", line 60, in __get_builtin_constructor
import _md5
ImportError: No module named _md5

Does anybody know a workaround for this? 有人知道解决方法吗? Thank you! 谢谢! I have a feeling that this problem is really about python installation than anything else 我有一种感觉,这个问题实际上是关于python安装而不是其他任何东西

Your problem has nothing to do with GAE, or the SDK. 您的问题与GAE或SDK无关。 I have faced this before. 我以前遇到过这个问题。 If you tried to install your custom version of python (on Ubuntu), then you land up with such issues. 如果您尝试安装自定义版本的python(在Ubuntu上),那么您就会遇到这样的问题。 You should uninstall the custom python using checkinstall. 您应该使用checkinstall卸载自定义python。 More details can be found about there here: Uninstall python built from source? 更多细节可以在这里找到: 卸载从源代码构建的python? .

Just use the default python and you'll be fine! 只需使用默认的python,你就没事了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM