ImportError: cannot import name discovery

Lewys Gardner picture Lewys Gardner · Aug 3, 2017 · Viewed 10.8k times · Source

I am using Google's python API client, and one of the lines it wants you to use is:

from apiclient import discovery

When I run this it returns the error:

ImportError: cannot import name discovery

Note: the apiclient module is installed and up to date

Thanks guys

Answer

Neeraj picture Neeraj · Sep 6, 2017

You should be able to get these dependencies with this simple install:

sudo pip install --upgrade google-api-python-client

See also: https://stackoverflow.com/a/23521799/1115187