开发者

PyDev project for Google App Engine not finding webapp2

开发者 https://www.devze.com 2023-04-13 07:44 出处:网络
I am attempting to try out Google App Engine wit开发者_如何转开发h python.Being familiar with Eclipse, I decided to use PyDev.After some trouble, I have a hello world program working... almost.It cann

I am attempting to try out Google App Engine wit开发者_如何转开发h 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.


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.


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.


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.


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消