ImportError: No module named httplib2 App engine 1.8.0

a 夏天 提交于 2019-12-22 08:15:16

问题


I get the error ImportError: No module named httplib2 when I import httplib2. I have the latest version of App Engine launcher (1.8.0.802) and I'm able see the lib folder with all files under /GoogleappEngineLauncher.app/..../lib/httplib2/httplib2 Eclipse is able to find it and import the with no problem but when I run my app I get the error.

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

Same occurs with a do: from apiclient import discovery which is in the folder google-api-python-client

Not sure what I'm doing wrong

Help is appreciated!!


回答1:


httplib2 is not part of python or core third partly libraries supplied by the appengine runtime - see https://developers.google.com/appengine/docs/python/tools/libraries27

You need include or link the httplib2 code directly in your project and deploy it with your project.



来源:https://stackoverflow.com/questions/17007034/importerror-no-module-named-httplib2-app-engine-1-8-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!