How Do You Troubleshoot the Message “ImportError: No module named ‘google'”?

Problem scenario
From the Python command prompt or when running a Python program, you receive this message "ImportError: No module named 'google'". What should you do?

Solution
Possible Solution #1
Try to run the program as sudo: sudo python nameOfProg.py

Possible Solution #2
Prerequisite
This assumes that pip has been installed. If you need assistance see this posting "How Do You Install pip?".

Procedure
Try this with or without sudo (depending on whether or not you are using "sudo" to run the Python program):

sudo pip install protobuf
# You may want to omit the "sudo" in the above command.

Possible Solution #3
Prerequisite
This assumes that pip has been installed. If you need assistance see this posting "How Do You Install pip?".

Procedures
Run these commands:

sudo pip uninstall protobuf
sudo pip install protobuf

# You may or may not want to omit the "sudo" in the above commands.

Leave a comment

Your email address will not be published. Required fields are marked *