Including httplib2

2019-08-14 20:35发布

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?

2条回答
我想做一个坏孩纸
2楼-- · 2019-08-14 20:40

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
查看更多
狗以群分
3楼-- · 2019-08-14 20:56
$ sudo pip3 install httplib2

import httplib2
查看更多
登录 后发表回答