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?
Asked
Active
Viewed 1.5k times
2
-
1What Python version are you using 2 or 3 etc? – Glyn Jackson Jun 23 '13 at 20:25
-
App engine Python does not support Python 3, but 2.7.3 !! – voscausa Jun 23 '13 at 22:51
2 Answers
4
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

Glyn Jackson
- 8,228
- 4
- 29
- 52
-
I'm on a mac with python3, sorry, but you were partially right. pip didnt work for what ever reason but I followed your link used python setup.py install to install it. But how do I include it in my PYTHONPATH, I'm working in Eclipse so I know right click properties and what not but I'm not sure there httplib2 ends up after the install. – EasilyBaffled Jun 23 '13 at 21:29