I'm trying to learn how to send emails in python using the Gmail API.
One of the first lines in my script:
from googleapiclient.discovery import build
gives me the error:
No module named googleapiclient.discovery
I am trying to install googleapiclient by doing:
sudo pip install --upgrade google-api-python-client
which seems to do all the right things until the end when it says:
Installing collected packages: httplib2, uritemplate, rsa, cachetools, pyasn1-modules, google-auth, google-auth-httplib2, google-api-python-client
Found existing installation: httplib2 0.9.1
Cannot uninstall 'httplib2'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
I wasn't sure if this message would stop thing from working, but I am still getting the message:
No module named googleapiclient.discovery
when I try to run my code. Any suggestions gratefully received!
pip uninstall httplib2and run thissudo pip install --upgrade google-api-python-clientagain or check if the package is installed alreadypip show google-api-python-client.pip install --user google-api-python-clientafter uninstalling it usingpip uninstall google-api-python-client.