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