How to fix ModuleNotFoundError: No module named ‘’


You want to run a Python script that uses one of the Google Cloud Python APIs but you get this error message:

ModuleNotFoundError: No module named ''


Reinstall any google cloud package using pip:

sudo pip install --upgrade google-cloud-storage


sudo pip3 install --upgrade google-cloud-storage

That will also reinstall the relevant module.

After that, re-run your script. If that didn’t work, try to install --upgrade some other google-cloud-* module, especially the modules you actually use in your script.