googlecodelabs / iot-data-pipeline

Apache License 2.0
18 stars 7 forks source link

ImportError: No module named google.cloud #7

Closed JKAWS closed 6 years ago

JKAWS commented 6 years ago

pi@WeatherStation:~/iot-data-pipeline $ python checkWeather.py Traceback (most recent call last): File "checkWeather.py", line 20, in from google.cloud import pubsub ImportError: No module named google.cloud

pi@WeatherStation:~/iot-data-pipeline $ sudo pip show google-cloud Name: google-cloud Version: 0.34.0 Summary: API Client library for Google Cloud Home-page: https://github.com/GoogleCloudPlatform/google-cloud-python Author: Google Cloud Platform Author-email: googleapis-publisher@google.com License: Apache 2.0 Location: /usr/local/lib/python2.7/dist-packages Requires:

sunsetmountain commented 6 years ago

Replicated the error on a fresh install using NOOBS 2.8.2 and with google-cloud 0.34.0.

sunsetmountain commented 6 years ago

The google-cloud package has been deprecated and is likely the root of this issue. The installation procedure that read...

sudo pip install --upgrade google-cloud

...is now...

sudo pip install --upgrade google-cloud-pubsub sudo pip install --upgrade oauth2client

If you have a Raspberry Pi that already has the google-cloud package installed, remove it first (sudo pip uninstall google-cloud-pubsub) before trying to install google-cloud-pubsub and oauth2client.

JKAWS commented 6 years ago

Verified working.