The same error can be seen if you are creating a Python module and your executing the script after installing it via pip
or pipx
command.
In this case ensure you have declared what the project minimally needs to run correctly into install_requires
section of your setup.py
file, so in this case:
install_requires=[
"google-api-python-client>=1.12.3",
"google-auth-httplib2>=0.0.4",
"google-auth-oauthlib>=0.4.1"
]