ImportError: No module named oauth2client

99封情书 提交于 2019-11-29 12:50:59

I just found out this documentation from Google App Engine https://cloud.google.com/appengine/docs/python/tools/libraries27#vendoring for installing third-party packages to the application.

As per the instructions, I created a folder called 'lib' inside my project folder, and created a file called appengine_config.py, also inside my project folder.

In appengine_config.py file, I entered the following:

from google.appengine.ext import vendor
vendor.add('lib')

Then, on my terminal while inside my project folder, I entered sudo pip install -t lib google-api-python-client.

This worked! The import no longer throws the error.

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