[SOLVED] Failure importing Google Credentails

imports

#1

Hello,

I am testing first example of

https://www.dexterindustries.com/howto/use-google-cloud-vision-on-the-raspberry-pi/

python camera-vision-logo.py

I get the following error message:

Traceback (most recent call last):
File “camera-vision-logo.py”, line 16, in
from oauth2client.client import GoogleCredentials
ImportError: No module named oauth2client.client

According failure info found in Google I have tried both:

a) pip install --upgrade oauth2client
b) https://cloud.google.com/appengine/docs/python/tools/libraries27#vendoring

But importError is not yet fixed. Any idea?

Thank you in advance.

Regards,

Daniel


#2

Hi @dani.hc,

Hmm, interesting. The last time I had a similar problem but with a different package where I had uninstalled it and installed it back again. Also, make sure you are running the version of Python appropriate for the pip command: pip for python (Python 2.x) and pip3 for python3 (Python 3.x).

If this all fails, then maybe try it again from a clean state. Or go with a virtual environment instead: that’s much more reliable than having to use the system-wide one.

Thank you!


#3

Hi @RobertLucian,

Thank for your quick answer. It works fine for python3, not for python2.


#4