"ImportError: No module named httplib2" 即使安装后仍然出现

8 浏览
0 Comments

"ImportError: No module named httplib2" 即使安装后仍然出现

我很难理解为什么在确保安装了httplib2后,我会遇到“ImportError: No module named httplib2”的错误。参见下面的内容:

$ which -a python

/usr/bin/python

/usr/local/bin/python

$ pip -V

pip 1.4.1 from /usr/local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg (python 2.7

$ pip list

google-api-python-client (1.2)

httplib2 (0.8)

pip (1.4.1)

pudb (2013.5.1)

Pygments (1.6)

setuptools (1.3.2)

wsgiref (0.1.2)

$ pip install httplib2

Requirement already satisfied (use --upgrade to upgrade): httplib2 in /usr/local/lib/python2.7/site-packages

Cleaning up...

$ python

Python 2.7.5 (default, Sep 12 2013, 21:33:34)

[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import httplib2

Traceback (most recent call last):

File "", line 1, in

ImportError: No module named httplib2

我还执行了以下操作:

$ find / | grep httplib2

/usr/local/lib/python2.7/site-packages/httplib2

/usr/local/lib/python2.7/site-packages/httplib2/__init__.py

[... edited for brevity]

真是烦人啊!> 对着上天摇拳头 <

0