ModuleNotFoundError: No module named ‘google.cloud’ jupyter notbook python 3.8.0

I am trying to use cloud storage python library in a Jupyter notebook.

I am running a virtual env with python 3.8.0 (don’t know if can be related but I’m on a mac with an M1 chip but running my terminal in Rosetta mode).

I ran pip install google-cloud-storage which worked, but when I launch Jupyter notebook and run from google.cloud import storage I get ModuleNotFoundError: No module named 'google.cloud'.

This is my first question here, so please advice if the question isn’t clear or if I am missing relevant information.

Answer

try this command inside the jupyter notebook

!pip install google-cloud-storage

then

from google.cloud import storage