【问题标题】:'No module named webtest' error in Google App Engine after pip install webtestpip install webtest 后 Google App Engine 中出现“没有名为 webtest 的模块”错误
【发布时间】:2013-11-11 07:57:02
【问题描述】:

当我尝试使用 webtest 在我的开发服务器上运行 gaeunit 时出现此错误。

    No module named webtest Status: 404 Not Found Content-Type: text/html; charset=utf-8 Cache-Control: no-cache Content-Length: 23 No module named webtest

我正在使用 gae 单元从这个 Google App Engine 文档运行测试。

https://code.google.com/p/gaeunit/ https://developers.google.com/appengine/docs/python/tools/handlertesting

当我进行常规单元测试时,测试工作正常。

我必须跳过额外的箍吗?我正在使用 Ubuntu 13.10

【问题讨论】:

    标签: python google-app-engine webtest


    【解决方案1】:

    所有未包含在 SDK 中的第 3 方库必须在您的项目中本地安装。

    pip install 将在您的机器上本地安装,但是 SDK 运行一个沙箱来模拟生产运行时。必须将所有内容复制或链接到您的项目中,以便进行部署。

    如果您进行一些搜索,则每隔几天就会询问此类问题(尽管并非特定于您的图书馆)。

    您应该阅读文档——尤其是关于沙盒的部分

    https://developers.google.com/appengine/docs/python/#Python_The_sandbox

    【讨论】:

      猜你喜欢
      • 2019-06-18
      • 2014-12-23
      • 2015-04-24
      • 2018-08-05
      • 1970-01-01
      • 1970-01-01
      • 2020-04-05
      • 2019-01-13
      • 2019-01-30
      相关资源
      最近更新 更多