Take the 2-minute tour ×

Possible Duplicate:
PyDev project for Google App Engine not finding webapp2

I am doing the helloworld tutorial and cannot connect from Python;

This is the app.yaml file:

application: "ceemee11111"
version: 1
runtime: python27
api_version: 1
threadsafe: true


- url: /.*
  script: helloworld.app

- remote_api: on

This is start of helloworld.py:

import cgi
import datetime
import urllib
import webapp2

from google.appengine.ext import db
from google.appengine.api import users

class Greeting(db.Model):
      """Models an individual Guestbook entry with an author, content, and date."""
      author = db.StringProperty()
      content = db.StringProperty(multiline=True)
      date = db.DateTimeProperty(auto_now_add=True)

in Python shell I chdir to helloworld import helloworld

and get import error "No module named webapp2"

The app runs in localhost and also in ceemee11111.appspot.com without error. As a test I commented out "import webapp2" and tried again and got an error "No module named google.appengine.ext"

Please some ideas



share|improve this question

marked as duplicate by mux, iMat, Brad Werth, Nimit Dudani, isNaN1247 Nov 18 '12 at 20:26


1 Answer 1

It seems that python can't find the library, so

  • Have you webapp2 installed in the system?. You can try with "pip install webapp2" or "easy_install"

  • If they are still missing, maybe you should check your "PYTHONPATH" variable, to check where is python looking for the libraries, and add yours to the path.

share|improve this answer
I would think if the app works on localhost and appspot.com that the modules would available. webapp2 is not in the available modules for python so I am going to try and install it. –  dan_ras Nov 16 '12 at 22:45
I have installed webapp2 in the modules of python and run the import helloworld again and get "import error: no module named webob" –  dan_ras Nov 16 '12 at 23:46
This seems very complex for a basic process. All I need is to have put() and fetch() access to the google datastore to get and retrieve data. Is there an easier method to do this. –  dan_ras Nov 17 '12 at 0:36
OK this is starting to make sense. google has its own /lib of modules and python has its /lib of modules. I have installed pip, can I go to the google/lib and run $ pip freeze -E [env1] > requirements.txt and then go to the python/lib and run $ pip install -E [env2] -r /path/to/requirements.txt and if so what is the /path/to/requirtments.txt –  dan_ras Nov 17 '12 at 21:15
all i had to do was add c:\....\google_appengine to the path variable to use the google lib instead of the python lib –  dan_ras Dec 4 '12 at 19:49
