I am a first time user of Python, I have Eclipse (Helios) on Windows XP and Pydev installed and all is well except that when I am following the GAE tutorial for Python
I get the unresolved import error on run_wsgi_app and webapp from from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app
The code runs fine. I have looked for an answer and added
F:\Program Files\Google\google_appengine\google\appengine\ext
and
F:\Program Files\Google\google_appengine\google\appengine\ext\webapp
to be sure to my PYTHONPATH via the Eclipse Python Interpreter interface. I have removed and re-added the interpreter, pressed Apply, restarted Eclipse but all to no avail.
I am posting this as I am sure many new users with GAE + Python + Eclipse + Pydev would have the same problem.
Regards, Chris
Add the package parent directory (the first directory with a init.py file)
to the PYTHONPATH in Eclipse under the 'External Libraries' tab.
Also beware of a bug in PyDev that does not respect/understand Python namespaces (as opposed to packages). For more info see:
http://sourceforge.net/tracker/index.php?func=detail&aid=3284882&group_id=85796&atid=577329
In general, add the package's parent directory to PYTHONPATH, not the module subdirectories:
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