Jim*_*mmy 5 python google-api google-api-client
我正在尝试按照本教程进行操作:https://developers.google.com/drive/v3/web/quickstart/python#step_1_turn_on_the_api_name
但是,当我运行它时,我收到以下错误:
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
Run Code Online (Sandbox Code Playgroud)
我已经尝试使用我所阅读的Google API版本1.3.2可能会解决问题,但它似乎没有改变任何东西.
我对Python很新.
我的第一个猜测是你的oauth2client版本与你的google-api-python-client版本不兼容.
尝试使用google-api-python-client == 1.5.2和oauth2client == 2.2.0,例如
| 归档时间: |
|
| 查看次数: |
4176 次 |
| 最近记录: |