I'm trying to get oauth to work on Google App Engine (GAE), but I'm unable to import the OAuth2Decorator
, because it tries to import gflags
and fails.
In command line I've ran help('modules')
and gflags is listed, and I've ran import os
+ import gflags
+ print os.path.dirname(gflags.__file__)
and received /Library/Python/2.7/site-packages/python_gflags-2.0-py2.7.egg
.
In GAE Dev Console I've ran:
import sys
import os
try:
import webapp2
import httplib2
from oauth2client.appengine import OAuth2Decorator
except ImportError, e:
print("The import failed!")
print(e)
and received:
The import failed!
No module named gflags
gflags
is imported by from oauth2client.appengine import OAuth2Decorator
, but GAE fails to import gflags
every time I run the code.
I'm not sure it makes a difference, but I'm running Mac OS 10.7.5 and python 2.7.1