0

I get this error when running dev_appserver.py just after installing GAE on Ubuntu 2011.04:

Traceback (most recent call last):
  File "dev_appserver.py", line 77, in <module>
    run_file(__file__, globals())
  File "dev_appserver.py", line 73, in run_file
    execfile(script_path, globals_)
  File "/home/nico/p/appengine-python-1.5.3/google/appengine/tools/dev_appserver_main.py", line 156, in <module>
    from google.appengine.tools import dev_appserver
  File "/home/nico/p/appengine-python-1.5.3/google/appengine/tools/dev_appserver.py", line 94, in <module>
    import zlib
ImportError: No module named zlib

Any idea what's going wrong?

Installing was a bit tricky because GAE only supports Python 2.5:

  • Download the latest Python 2.5.*
  • ./configure --with-zlib (I also tried without the with-zlib option, same result)
  • If you have /usr/include/sqlite3.h then remove it because GAE does not compile if present
  • make

1 Answer 1

0

Ubuntu 11.04 comes with python 2.6 as the default version. It is suggested to use Google app engine with version 2.5. I am using it though for many years with python 2.6 without any issues.

What you need to do in order to execute it smoothly with python 2.6 is to edit google/appengine/tools/dev_appserver.py and add these three lines

  '_counter',
  '_fastmath',
  'strxor',

after 'XOR', and before '_Crypto_Cipher__AES', around line ~1350.

1
  • It worked also with Python 2.7 which is the default for Ubuntu 10.04 Natty Narwhal
    – Jader Dias
    Sep 2, 2011 at 20:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .