damon
damon

Reputation: 8477

pythonpath for google app engine in pydev eclipse

I have google app engine installed to /home/mydev folder such that dev_appserver.py is in /home/mydev/google_appengine directory.

In eclipse helios,I have pydev and for my project's PYTHONPATH,I added the path /home/mydev/google_appengine/lib under external libraries.

Still,pydev compains it cannot resolve

import webapp2

Any idea how to solve this?

Upvotes: 1

Views: 1277

Answers (3)

Fabio Zadrozny
Fabio Zadrozny

Reputation: 25362

When inside PyDev, have you created your project as a google app engine project (that's a project type that PyDev has)... The wizard to create that kind of project should automatically get the google app libraries so that your import works.

See: http://pydev.blogspot.com.br/2009/05/testing-on-pydev-146-google-app-engine.html

Upvotes: 1

thavan
thavan

Reputation: 2439

You need to add /home/mydev/google_appengine/lib/webapp2 in PYTHONPATH. Because within this directory only webapp2 module resides.

Upvotes: 1

daedalus
daedalus

Reputation: 10923

I am using Eclipse Indigo 3.7.2, PyDev 2.2.3, and GAE 1.6.5 and I get the same problem by pointing external libraries to /home/mydev/google_appengine/lib (or the equivalent on my machine), but it resolves when I point the external libraries to /home/mydev/google_appengine, the parent directory.

Hope this helps (this is an empirical solution that worked for me and have no specific reason why it works).

Upvotes: 1

Related Questions