0

我正在尝试安装一个将部署在Google App Engine上的应用程序。Google AppEngine本地开发ImportError

我的烧瓶应用程序依赖于Google云端存储 - 数据存储。 google-cloud,等等。

我跑pip install -t lib -r requirements.txt将我所有的依赖项安装到lib目录中。

当我在烧瓶应用程序的根目录下运行dev_appserver.py,我得到以下ImportError

ImportError: No module named google.cloud.datastore

不知道为什么,我看到这一点。看看lib目录,它看起来像pip安装了我所有的依赖项。

为什么本地应用程序引擎不能找到该模块。

我知道我应该使用App Engine的Datastore,它稍有不同,并且需要很多代码更改。但是,为什么不App Engine的发现和使用,谷歌数据储存模块

仅供参考,我在Mac上运行此OS-X

+0

在你的'appengine_config.py'文件中你指定了'lib'文件夹的路径吗? –

+0

是的,我有该文件并将lib添加到路径。 – user462455

+0

你还在遇到这个问题吗?如果是这样 - 你可以提供你的'dev_appserver.py'的内容和你的应用程序的文件结构吗? –

回答

1

你需要创建一个相同的文件夹命名为appengine_config.py文件作为app.yaml文件,并添加以下行:

# appengine_config.py 
from google.appengine.ext import vendor 

# Add any libraries install in the "lib" folder. 
vendor.add('lib') 

更多here

相关问题