我尝试使用gpread和python来编辑google电子表格。我遵循了这个教程:http://gspread.readthedocs.org/en/latest/oauth2.html 当我运行代码时,它表示没有名为oauth2的模块客户端.client. 我需要安装其他东西才能正常工作吗?在
更新 这是我的代码:
import json
import gspread
from oauth2client.client import SignedJwtAssertionCredentials
json_key = json.load(open('GraduationCash-c4b4c0667c75.json'))
scope = ['https://spreadsheets.google.com/feeds']
credentials = SignedJwtAssertionCredentials(json_key['client_email'], json_key['private_key'], scope)
gc = gspread.authorize(credentials)
wks = gc.open("Where is the money Lebowski?").sheet1
raw_input()
另外,我应该提到我在Windows8上,所以这些命令不起作用。它仍然在说没有密码库可用
是,必须安装OAuth客户端library:
当然,您总是可以从源代码安装,也可以:
^{pr2}$注意 在调用后,如果您遇到类似“没有可用的加密库”的错误:
或者
相关问题 更多 >
编程相关推荐