小编Rya*_*rdt的帖子

GSpread ImportError:没有名为oauth2client.service_account的模块

好的我正在跟随"成为技术营销人员"课程,我正在尝试学习如何使用GSpread管理Google Spreadsheets.我已经按照http://gspread.readthedocs.io/en/latest/oauth2.html上的文档进行了操作.我按照上面第二个URL中的步骤操作了一个包含以下代码的文档:

import gspread
from oauth2client.service_account import ServiceAccountCredentials

scope = ['https://spreadsheets.google.com/feeds']

credentials = ServiceAccountCredentials.from_json_keyfile_name('DFS Google Sheets Data Imports-7205de852ff7.json', scope)

gc = gspread.authorize(credentials)

wks = gc.open("Authority Scraper").sheet1
wks.update_cell(1,2,"Hello World!")
Run Code Online (Sandbox Code Playgroud)

从那里我得到了终端中的错误:来自oauth2client.service_account import ServiceAccountCredentials ImportError:没有名为oauth2client.service_account的模块

终端错误打印输出

有人请帮帮我.其他没有名为oath2client.service_account的模块的答案对我不起作用.谢谢!

python google-api-python-client gspread google-app-engine-python

9
推荐指数
2
解决办法
1万
查看次数