简体   繁体   中英

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)>

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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