Using Httplib2 on Python Appengine

后端 未结 4 1713
攒了一身酷
攒了一身酷 2021-01-04 10:56

Why am I getting this error when running my application which is trying to OAuth with Foursquare?

import httplib2
ImportError: No module named httplib2


        
相关标签:
4条回答
  • 2021-01-04 11:08

    https://developers.google.com/api-client-library/python/start/installation

    To install the library and all of its dependencies in an App Engine project, download the file named google-api-python-client-gae-N.M.zip from the list of downloads, where N.M is the version number of the latest release. Unzip that file into your project.

    0 讨论(0)
  • 2021-01-04 11:23

    You will need to include the library in your project so that the App Engine runtime knows what you're importing.

    From here:

    You can include other pure Python libraries with your application by putting the code in your application directory. If you make a symbolic link to a module's directory in your application directory, appcfg.py will follow the link and include the module in your app.

    0 讨论(0)
  • 2021-01-04 11:23

    I've created a simple example on how to do this when using Google App Engine. (https://github.com/muanis/foursquare-oauth-bootstrap) basically you need Google oAuth2 Client (http://code.google.com/p/google-api-python-client/) and httplib2 (http://code.google.com/p/httplib2/)

    0 讨论(0)
  • 2021-01-04 11:28

    Add httplib2 as a third party library as documented here:

    https://cloud.google.com/appengine/docs/python/tools/libraries27#vendoring

    Install with:

    pip install -t lib httplib2
    
    0 讨论(0)
提交回复
热议问题