[英]ImportError: No module named appengine.api
I just updated app engine and when I run dev_appserver . 我刚刚更新了应用程序引擎,并在运行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.
他还安装了另一个Google软件包,即protobuf。
If you try print(google.__path__)
, it will probably say something else than the google appengine path. 如果您尝试
print(google.__path__)
,它可能会说除了Google Appengine路径以外的其他内容。 Or try dir(google)
to get some idea of what is actually imported. 或者尝试使用
dir(google)
来了解实际导入的内容。
To solve this, he had to remove protobuf. 为了解决这个问题,他不得不删除protobuf。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.