google analytics APIをpythonで利用する
上記について、下記のURLの通りにやっているのですが、
https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/service-py
下記のエラーが出ます。解決方法をご存知のかた、宜しくお願い致します。
C:\Users\Documents>python HelloAnalytics.py
Traceback (most recent call last):
File "HelloAnalytics.py", line 5, in <module>
from apiclient.discovery import build
File "C:\Users\AppData\Local\Continuum\Anaconda3\envs\tensorenv\lib\site-packages\apiclient\__init__.py", line 16, in <module>
from googleapiclient import channel
File "C:\Users\AppData\Local\Continuum\Anaconda3\envs\tensorenv\lib\site-packages\googleapiclient\channel.py", line 62, in <module>
from googleapiclient import errors
File "C:\Users\AppData\Local\Continuum\Anaconda3\envs\tensorenv\lib\site-packages\googleapiclient\errors.py", line 25, in <module>
from oauth2client import util
ImportError: cannot import name 'util'
追記
pip show google-api-client
の結果:
Name: google-api-python-client
Version: 1.3.2
Summary: Google API Client Library for Python
Home-page: http~
Author: Google Inc.
Author-email: UNKNOWN
License: Apache 2.0
Location: c:\users\appdata\local\continuum\anaconda3\lib\site-packages
Requires: uritemplate, httplib2, oauth2client
pip show oauth2client
の結果:
Name: oauth2client
Version: 4.0.0
Summary: OAuth 2.0 client library
Home-page: http~
Author: Google Inc.
Author-email: UNKNOWN
License: Apache 2.0
Location: c:\users\appdata\local\continuum\anaconda3\lib\site-packages
Requires: pyasn1, six, rsa, httplib2, pyasn1-modules