Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named appengine.api

I just updated app engine and when I run dev_appserver . in my project directory I get the following error.

MacBook-xx-xxx-xxx-xxxx vinay$ dev_appserver.py .
Traceback (most recent call last):
  File "/usr/local/bin/dev_appserver.py", line 84, in <module>
    _run_file(__file__, globals())
  File "/usr/local/bin/dev_appserver.py", line 80, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 31, in <module>
    from google.appengine.api import appinfo
ImportError: No module named appengine.api

UPDATE

Python 2.7.10 (default, Jul 14 2015, 19:46:27) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import google
>>> print(google)
<module 'google' (built-in)>
like image 583
Vinay Joseph Avatar asked May 15 '16 09:05

Vinay Joseph


1 Answers

My colleague had the same problem. He had an other google package installed, protobuf in his case.

If you try print(google.__path__), it will probably say something else than the google appengine path. Or try dir(google) to get some idea of what is actually imported.

To solve this, he had to remove protobuf.

like image 191
fredrik Avatar answered Sep 27 '22 20:09

fredrik