在 Python Appengine 上使用 Httplib2
为什么在运行尝试使用 Foursquare 进行 OAuth 的应用程序时出现此错误?
import httplib2
ImportError: No module named httplib2
我已经通过下载 httplib2 并按照 此处的说明在命令行上安装 $ python setup.py install 来安装它
我错过了什么吗?谢谢
Why am I getting this error when running my application which is trying to OAuth with Foursquare?
import httplib2
ImportError: No module named httplib2
I have installed httplib2 by downloading it and $ python setup.py install on the command line as instructed here
Am I missing something? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要在项目中包含该库,以便 App Engine 运行时知道您要导入的内容。
来自此处:
You will need to include the library in your project so that the App Engine runtime knows what you're importing.
From here:
我创建了一个简单的示例来说明如何在使用 Google App Engine 时执行此操作。 (https://github.com/muanis/foursquare-oauth-bootstrap)基本上你需要Google oAuth2客户端(http://code.google.com/p/google-api-python-client/)和httplib2(http: //code.google.com/p/httplib2/)
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/)
添加
httplib2
作为第三方库,如下所述:https://cloud.google.com/appengine/docs/python/tools/libraries27#vendoring
安装:
Add
httplib2
as a third party library as documented here:https://cloud.google.com/appengine/docs/python/tools/libraries27#vendoring
Install with:
https://developers.google.com/api-client-library/python /开始/安装
https://developers.google.com/api-client-library/python/start/installation