pythongoogle-docsgoogle-docs-api

Why am I getting a ModuleNotFoundError when trying to quickstart the Google Docs API in Python?


I am trying to use Python to read a Google Doc, and I have been following the tutorial found here: https://developers.google.com/workspace/docs/api/quickstart/python

However, when I run quickstart.py, I get the following error message:

ModuleNotFoundError: No module named 'google.auth'; 'google' is not a package

I have tried reinstalling google.auth multiple times, but it has not fixed the error. Is there anything else I can do to fix this or some other method of reading a Google Doc in Python?


Solution

  • This usually means there's a naming conflict in your environment most likely you have a file or folder named google.py or a directory named google/ in your current working directory or Python path which conflicts with the actual google package