google.appengine.ext Python Module ImportError No module named google.appengine.ext

Alan Wells picture Alan Wells · Jan 2, 2014 · Viewed 14.4k times · Source

Python 2.7.6, Google APIs Client Library for Python for Google App Engine, Google Developer's Guide

I'm going through the Google documentation, and trying to duplicate their example. When I run the command:

from google.appengine.ext import webapp

from Python Shell, I get the error msg:

No module named google.appengine.ext

So obviously, that file is not on my computer. I've done searches for the file on my hard drive and haven't found anything. I've run easy_install to install the Google API as instructed in the official Google Quick Start video. I'm not sure if Google's documentation is now outdated, or what is happening. Where do I get the google.appengine.ext? I'm assuming that my problem is simply that I don't have that module.

Answer

varun picture varun · Jan 4, 2016

You may need to add the following line, incase you are running stand alone tests

 sys.path.append('/usr/local/google_appengine/')
 sys.path.append('/usr/local/google_appengine/lib/yaml/lib/')
 if 'google' in sys.modules:
     del sys.modules['google']