4
我想按照这个教程:https://developers.google.com/drive/v3/web/quickstart/python#step_1_turn_on_the_api_name谷歌云端硬盘API - 导入错误:无法导入名UTIL
然而,当我运行它,我得到以下错误:
Traceback (most recent call last):
File "test.py", line 5, in <module>
from apiclient import discovery
File "/Library/Python/2.7/site-packages/apiclient/__init__.py", line 16, in <module>
from googleapiclient import channel
File "/Library/Python/2.7/site-packages/googleapiclient/channel.py", line 62, in <module>
from googleapiclient import errors
File "/Library/Python/2.7/site-packages/googleapiclient/errors.py", line 25, in <module>
from oauth2client import util
ImportError: cannot import name util
我已经尝试使用我读过的Google API 1.3.2版可能会解决这个问题,但它似乎没有改变任何内容。
我对Python相当陌生。
'PIP安装oauth2client == 2.2.0'解决我的问题。谢谢。 – Desprit