GAE not finding httplib2

3 views
Skip to first unread message

Vladimir via StackOverflow

unread,
Sep 9, 2016, 7:30:04 AM9/9/16
to google-appengin...@googlegroups.com

I'm trying to run the sample code https://github.com/google/google-api-python-client/tree/master/samples/appengine from the Google API Python Client on the Google Cloud platform. After starting the test app I'm seeing this error:

ImportError: No module named httplib2

I checked the cloud env provided and it has the lib available

Requirement already satisfied (use --upgrade to upgrade): httplib2 in /usr/local/lib/python2.7/dist-packages

/google/go_appengine/lib/httplib2
/google/go_appengine/lib/httplib2/httplib2
/google/google_appengine/lib/httplib2
/google/google_appengine/lib/httplib2/httplib2
/google/google-cloud-sdk/.install/.backup/lib/third_party/httplib2
/google/google-cloud-sdk/.install/.backup/platform/bq/third_party/httplib2
/google/google-cloud-sdk/.install/.backup/platform/gsutil/third_party/httplib2
/google/google-cloud-sdk/.install/.backup/platform/gsutil/third_party/httplib2/python2/httplib2
/google/google-cloud-sdk/.install/.backup/platform/gsutil/third_party/httplib2/python3/httplib2
/google/google-cloud-sdk/lib/third_party/httplib2
/google/google-cloud-sdk/platform/bq/third_party/httplib2
/google/google-cloud-sdk/platform/google_appengine/lib/httplib2
/google/google-cloud-sdk/platform/google_appengine/lib/httplib2/httplib2
/google/google-cloud-sdk/platform/gsutil/third_party/httplib2
/google/google-cloud-sdk/platform/gsutil/third_party/httplib2/python2/httplib2
/google/google-cloud-sdk/platform/gsutil/third_party/httplib2/python3/httplib2
/home/MY_USER/src/triple-carrier-142807/python_gae_quickstart-2016-09-08-10-47/httplib2
/usr/local/lib/python2.7/dist-packages/httplib2

I can import it in the python command line:

Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import httplib2
>>> 

It must be installed but GAE is not recognizing it.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/39410543/gae-not-finding-httplib2

turkus via StackOverflow

unread,
Sep 9, 2016, 7:40:05 AM9/9/16
to google-appengin...@googlegroups.com

You could create env without global packages, so they aren't available in env, but in global python shell yes (without env).



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/39410543/gae-not-finding-httplib2/39410746#39410746

Vladimir via StackOverflow

unread,
Sep 9, 2016, 9:10:06 AM9/9/16
to google-appengin...@googlegroups.com

I fixed it myself by putting httplib2 in the engine dir (the dir where app.yaml exists).



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/39410543/gae-not-finding-httplib2/39412342#39412342
Reply all
Reply to author
Forward
0 new messages