ImportError: No module named apiclient.discovery
You should be able to get these dependencies with this simple install:
sudo pip install --upgrade google-api-python-client
This is described on the quick start page for python.
apiclient
was the original name of the library.
At some point, it was switched over to be googleapiclient
.
If your code is running on Google App Engine, both should work.
If you are running the application yourself, with the google-api-python-client installed, both should work as well.
Although, if we take a look at the source code of the apiclient
package's __init__.py
module, we can see that the apiclient
module was simply kept around for backwards-compatibility.
Retain apiclient as an alias for googleapiclient.
So, you really should be using googleapiclient
in your code, since the apiclient
alias was just maintained as to not break legacy code.
# bad
from apiclient.discovery import build
# good
from googleapiclient.discovery import build
apiclient
is not in the list of third party library supplied by the appengine runtime: http://developers.google.com/appengine/docs/python/tools/libraries27 .
You need to copy apiclient
into your project directory & you need to copy these uritemplate
& httplib2
too.
Note: Any third party library that are not supplied in the documentation list must copy to your appengine project directory