I am trying to run the 'generate_refresh_token.py' file in the authentification folder of the AdWords API.
But when I do python generate_refresh_token.py
as described in the documentation, I get the error ModuleNotFoundError: No module named 'google_auth_oauthlib'
.
So I try to install the module with pip install google-auth-oauthlib
, and here is the output:
Requirement already satisfied: google-auth-oauthlib in /home/$USER/anaconda3/lib/python3.6/site-packages (0.2.0)
I activate my anaconda3 environment by doing source activate /home/$USER/anaconda3/envs/$environment_name
. I try to generate the token again with the command above, same error.
Could not find any useful answer or anyone having the same issue with this module. Does anyone have a suggestion I could try?
UPDATE: I have found the error. When I installed the google-auth-oauthlib module via pip, it was installed as a module in the anaconda3 library. But when I run python from the command line, it uses the version from my system, which doesn't have this module.
I had the same issue. Was resolved by using:
sudo pip install google-auth-oauthlib
the sudo was necessary, not sure why, maybe someone else can eleborate.
If you use conda
instead of pip
:
conda install google-auth google-auth-oauthlib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With