本文介绍了包括httplib2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我在导入httplib2时遇到了一些常见问题,我遇到了和类似的答案。但现在我必须大胆,并问一个愚蠢的问题,我该如何包括/将模块链接到我的项目? 解决方案

由于您发布到 httplib2 的链接不是Python自带的标准库,因此您必须先安装它。


$ b

要在Python 3中安装 httplib2 ,您可以使用(Ubuntu):

 $ b $ p $ b pre pre pre pre pre pre pre pre> 

  pip install httplib2 

这里可以直接下载其他说明:



然后确保它在你的PYTHONPATH上。



然后只需包括它:

  import httplib 


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?

解决方案

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

这篇关于包括httplib2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 20:50