Search code examples
google-oauthgoogle-app-engine-python

ImportError: No module named appengine


Following Google's example code at the time of posting, the OAUTH2 decoration for the app engine client should be imported as follows:

from oauth2client.appengine import OAuth2Decorator

Attempting to import that module results in the following log error:

from oauth2client.appengine import OAuth2Decorator

ImportError: No module named appengine


Solution

  • Google has moved the module but has not updated their example code.

    The correct import is now:

    from oauth2client.contrib.appengine import OAuth2Decorator
    

    (Notice the contrib module. Many related modules are also housed there as well.)