Google App Engine 的 PyDev 项目未找到 webapp2

发布于 2024-12-09 19:46:58 字数 368 浏览 0 评论 0原文

我正在尝试使用 python 来尝试 Google App Engine。熟悉 Eclipse 后,我决定使用 PyDev。经过一番麻烦之后,我有一个 hello world 程序正在运行......几乎。它找不到 webapp2 导入,告诉我它尚未解决。我已按照我能找到的所有说明进行操作,并将谷歌应用程序引擎库链接起来 - 我认为。我已经搜索了 webapp2 作为潜在的导入,但在任何库文件中都找不到它。一般来说,我对 python 非常陌生,甚至对 Google App Engine 也很陌生,所以我确信这是一个简单的问题,但由于我的新手而加剧了。

我正在 OS-X 上运行,运行 Eclipse Indigo Service Release 1。截至周二晚上,我可以下载最新版本的 PyDev。

I am attempting to try out Google App Engine with python. Being familiar with Eclipse, I decided to use PyDev. After some trouble, I have a hello world program working... almost. It cannot find the webapp2 import, telling me it is unresolved. I have followed all of the instructions I can find, and have the google app engine libraries linked up - I think. I have searched for webapp2 as a potential import, and cannot find this anywhere in any of the library files. I am really new to python in general, and even newer to the Google App Engine, so I am certain that this is a simple problem that is exacerbated by my newness.

I am running on OS-X, running Eclipse Indigo Service Release 1. I have the latest version of PyDev available for download as of Tuesday evening.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

你与清晨阳光 2024-12-16 19:46:58

在首选项中,查看 PyDev > 下的内容解释器 - Python(或您使用的任何一个),并确保 webapp2 列在“库”选项卡的“系统库”下。如果不是,请通过单击右侧的“新建文件夹”来添加它,然后单击“应用”并等待它重新查找您的功能。

请注意,webapp2 不是默认库的一部分,必须单独安装。 这里是下载它的链接。

In Preferences, look under PyDev > Interpreter - Python (or whichever you're using), and make sure that webapp2 is listed under the Libraries tab's System libs. If it's not, add it by clicking New Folder on the right, then click apply and wait for it to re-look up your functions.

Note that webapp2 is not part of the default libraries, and must be installed separately. Here is a link to download it.

你与昨日 2024-12-16 19:46:58

当前的 SDK 不支持 dev_appserver 上的 Python 2.7 运行时,因此它不捆绑像 webapp2 这样的新库。如果您需要的只是库,您可以自己下载它们并将它们包含在您的应用程序中,但如果您需要额外的运行时功能(例如多线程和 PIL),您现在需要在生产环境中进行开发。

The current SDK does not support the Python 2.7 runtime on the dev_appserver, so it doesn't bundle new libraries like webapp2. If all you need is the libraries, you can download them and include them in your app yourself, but if you need extra runtime features like multithreading and PIL, you will need to do your development in the production environment for now.

习ぎ惯性依靠 2024-12-16 19:46:58

我也遇到这个问题。
我遵循 TorelTwiddler 的指示 ->他是对的,没有 webapp2。

您必须将 ${GOOGLE_APP_ENGINE}/lib/webapp2 添加到“外部库”。

发生这种情况是因为(我猜)您只更改了项目的解释器,而不是使用 PyDev 创建一个全新的 GAE 项目。
此操作没有重新扫描它应该包含的库。

如果您使用 Pydev 创建一个新的 GAE 项目,您将看到 webapp2 在外部库列表中。

I encounter this problem, too.
And I follow TorelTwiddler's instruction -> he's right, there's no webapp2.

You have to add ${GOOGLE_APP_ENGINE}/lib/webapp2 to the "External Libraries".

This occurs because(I guess) you only change the interpreter of the project, not create a whole new GAE project with PyDev.
This action didn't re-scan the libs it should include.

If you are Create a new GAE project w/ Pydev, you'll see webapp2 is in the external libs' list.

暮光沉寂 2024-12-16 19:46:58

这不是 PyDev 的问题 - webapp2 不包含在 SDK 中 - 下载 webapp2 并将其与附加项一起放入项目根目录 - 不要例外 SDK 1.5.5 支持 python 2.7,因为只有生产才这样做。

http://code.google.com/p/googleappengine/issues/detail ?id=6103

It is not problem of PyDev - webapp2 is not included in SDK - download webapp2 put into project root both with extras - do not except that SDK 1.5.5 support python 2.7 since only production do it.

http://code.google.com/p/googleappengine/issues/detail?id=6103

喵星人汪星人 2024-12-16 19:46:58

将 ${GOOGLE_APP_ENGINE}/lib/webapp2-2.5.2 添加到“外部库”对我有用。
App Engine SDK 版本:1.8.2
Python版本:2.7

adding ${GOOGLE_APP_ENGINE}/lib/webapp2-2.5.2 to the "External Libraries" worked for me.
App Engine SDK ver:1.8.2
Python version: 2.7

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文