4

ImportError: No module named httplib2导入时出现错误httplib2。我有最新版本的 App Engine 启动器(1.8.0.802),我可以看到包含/GoogleappEngineLauncher.app/..../lib/httplib2/httplib2 Eclipse 下所有文件的 lib 文件夹能够找到它并毫无问题地导入,但是当我运行我的应用程序时出现错误。

ERROR    2013-06-09 06:15:28,554 wsgi.py:219] 
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 196, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 255, in _LoadHandler
    handler = __import__(path[0])
File "/Users/user1791567/Documents/git/workspace/MyApp/test.py", line 7, in <module>
    import httplib2
ImportError: No module named httplib2

do:from apiclient import discovery也在文件夹中google-api-python-client

不知道我做错了什么

帮助表示赞赏!

4

1 回答 1

6

httplib2 不是 appengine 运行时提供的 python 或核心第三部分库的一部分 - 请参阅https://developers.google.com/appengine/docs/python/tools/libraries27

您需要在项目中直接包含或链接 httplib2 代码并将其部署到您的项目中。

于 2013-06-09T06:42:01.310 回答