ImportError: No module named _md5

159 views
Skip to first unread message

JoshuaJ

unread,
Sep 20, 2008, 12:25:35 PM9/20/08
to Google App Engine
When I try to run google's "hello world" example in
GoogleAppEngineLauncher on Mac OS X, I get an error message
complaining "ImportError: No module named _md5".

A similar question was posted here several months ago, and a
workaround was provided, but that one no longer applies; the
workaround has already been incorporated into the latest versions of
GoogleAppEngineLauncher, but I'm still having the problem!

Here's the log that it outputs:


*** Running dev_appserver with the following flags:
--admin_console_server= --port=8080
Python command: /opt/local/bin/python2.5
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
dev_appserver.py", line 55, in <module>
execfile(script_path, globals())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver_main.py", line 73, in <module>
from google.appengine.tools import appcfg
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/appcfg.py", line 40, in <module>
import sha
File "/opt/local/lib/python2.5/sha.py", line 6, in <module>
from hashlib import sha1 as sha
File "/opt/local/lib/python2.5/hashlib.py", line 133, in <module>
md5 = __get_builtin_constructor('md5')
File "/opt/local/lib/python2.5/hashlib.py", line 60, in
__get_builtin_constructor
import _md5
ImportError: No module named _md5

Marzia Niccolai

unread,
Sep 22, 2008, 1:05:29 PM9/22/08
to google-a...@googlegroups.com
Hi,

If you could provide some more information, that would be helpful:

What version of the SDK are you currently running 1.1.3?
What version of Mac OS are you running?
Are you using the Mac Python install, or a different Python installation when running the SDK?

Thanks,
Marzia

faber

unread,
Nov 16, 2008, 3:39:33 PM11/16/08
to Google App Engine
Okay, the OP seems to have gone missing, so I'll take his place. :-)

My app is successfully running under Ubuntu as well as on Appengine
itself. I'm trying to move development over onto my Macbook and ran
into the same problem.

On Sep 22, 12:05 pm, "Marzia Niccolai" <ma...@google.com> wrote:
> Hi,
>
> If you could provide some more information, that would be helpful:
>
> What version of the SDK are you currently running 1.1.3?

I am running 1.1.5.151

> What version of Mac OS are you running?

OS X 10.4 (Tiger)

> Are you using the Mac Python install, or a different Python installation

I had to upgrade Pyhton to v 2.5. I did that using Macports.

> when running the SDK?

IIUC, yes. I get the error on my local machine. I'm using Eclipse as
my IDE but I see the same error from that little
GoogleAppEngineLauncher thingie.

This was SO much easier under Ubuntu! :-)

>
> Thanks,
> Marzia

Faber Fedor

unread,
Nov 16, 2008, 5:48:44 PM11/16/08
to Google App Engine
And since Marzia is probably taking a well-deserved rest this weekend, I'll answer the OP's question!

You need to also install py25-hashlib, e.g.

sudo port install py25-hashlib

and you no longer get this error. 

Now, to fix my other errors...
Reply all
Reply to author
Forward
0 new messages