Modulenotfounderror: no module named google error occurs if the google-api-python-client package is either not installed or misconfigured. There is a big confusion around this error because we get a similar error message in multiple python packages. In this article, we will address all of them.
Modulenotfounderror: no module named google ( Solution ) –
The best way to solve this error is to use the pip package manager. It will fetch the executive binary files or wheel package and put them into the required location.
Solution 1: Using pip to install google-api-python-client –
Just run the single command with pip and here we go.
pip install google-api-python-client
Solution 2: Using conda to install google-api-python-client –
Completely similar to pip package manager we can use conda package manage it will also do the same task as pip package manager do. Here is the command for this.
Just run the single command and here we go.
conda install -c conda-forge google-api-python-client
Solution 3 : Using git ( source ) to install google-api-python-client –
Unlike the other way if you want to install google-api-python-client from the source code itself you may use the official GitHub for this module. Here you have to use install.py to build the executable. Please go through the documentation. It contains all the steps.
Other Similar Errors :
1. There is a separate package for google search engine python binding. This also throws a similar error message. Here you need to be very careful which module you are using. If it is google then run the below command.
pip install google
2. Sometimes a similar error occurs because google cloud package. For the Google cloud package, you need to run the below command.
pip install google-cloud pip install google-cloud-vision
It will install the latest version for google-cloud-vision etc. You can specify the version as well here.
Data Science Learner Team
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.