我正在玩ndb,但当我在python中导入appengine模块时卡住了。这只发生在我的单元测试中。单元测试位于项目根目录的test.py中。无法导入模块appengine.ext
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from google.appengine.ext import ndb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named appengine.ext
以下是与上述相关的.bash_profile的内容。
APP_ENGINE_HOME="/Users/xxxxx/google-cloud-sdk/platform/google_appengine/"
export PATH=$PATH:$MYSQL:$M2_HOME/bin:$ANT_HOME/bin:$CATALINA_HOME/bin:$APP_ENGINE_HOME
我有一个名为谷歌在google_appengine结构如下
.Gooogle
+-- __init__.py
+-- appengine
| +-- __init__.py
| +-- ext
| +-- ndb
| +-- __init__.py
请帮助目录。
我试过了你的建议,但是我仍然收到同样的错误。 “ImportError:没有名为appengine.ext的模块” – 2014-08-31 11:27:55