【问题标题】:something messy with enable-app-engine-projectenable-app-engine-project 有点乱
【发布时间】:2012-10-24 13:29:17
【问题描述】:

我正在学习本教程 https://developers.google.com/bigquery/articles/dashboard#downloadinstalllibraries

他们是这么说的

cd source/
enable-app-engine-project hellodashboard/

这会将大约 60 个文件复制到项目目录中。但我只看到复制了大约 10 个文件。项目目录中的 oauth2client 文件夹只有 __init__.pyfile 由于我正在使用

from oauth2client.appengine import oauth2decorator_from_clientsecrets

当我运行我的程序时,它显示一个错误

from oauth2client.appengine import oauth2decorator_from_clientsecrets
ImportError: No module named appengine

所以我手动将所有文件从 oauth2client zip 复制到项目 oauth2client 目录。 现在,当我运行我的程序时,它没有显示任何错误并且似乎运行良好。是 enable-app-engine-project 命令有什么乱七八糟的地方,还是我做错了什么。

【问题讨论】:

    标签: python google-app-engine oauth-2.0 google-bigquery google-api-python-client


    【解决方案1】:

    enable-app-engine-project 尝试根据本地系统上安装模块的路径来定位源。您是否在本地安装了这些模块?

    或者,您可以简单地将以下目录手动复制到您的 App Engine 项目中:

    SOURCES = [
        'gflags',
        'gflags_validators',
        'httplib2',
        'oauth2client',
        'oauth2',
        'apiclient',
        'uritemplate',
        ]
    

    【讨论】:

      猜你喜欢
      • 2013-05-05
      • 1970-01-01
      • 1970-01-01
      • 2014-01-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-01
      • 2014-11-13
      相关资源
      最近更新 更多