Including httplib2

丶灬走出姿态 提交于 2020-03-24 08:16:07

问题


So I was having the usual problem with importing httplib2, I came across this and similar answers. But now I must be bold, and ask a dumb question, how do I include/link the modual into my project?


回答1:


As the link you posted to states httplib2 is not a standard library that comes with Python you have to install it first.

To install httplib2 in Python 3 you can use (Ubuntu):

sudo apt-get install python3-httplib2

or pip

pip install httplib2

Other instructions for direct download here: http://code.google.com/p/httplib2/wiki/Install

Then make sure it's on your PYTHONPATH.

Then just include it:

import httplib



回答2:


$ sudo pip3 install httplib2

import httplib2


来源:https://stackoverflow.com/questions/17264808/including-httplib2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!