aduckworth
aduckworth

Reputation: 25

Python Quickstart ModuleNotFoundError: No module named 'google_auth_oauthlib'

I set up a venv for my project and ran pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib to get the Google packages (after activating the venv).

When I attempt to run the Python Quickstart code (which I copy/pasted into my VScode project) I get the error: ModuleNotFoundError: No module named 'google_auth_oauthlib'. I ran pip list and verified that version 0.4.2 is installed.

pip list snapshot

My setup: MacOS 10.15.07 VScode 1.53.2 venv Python 3.7.7

Upvotes: 1

Views: 881

Answers (2)

fullbl00m
fullbl00m

Reputation: 39

Maybe try using pip3 install instead? This is what fixed it for me.

Upvotes: 0

Aerials
Aerials

Reputation: 4419

To be sure, activate the virtual environment in the shell you will use to run the quickstart and run pip freeze. Additionally make sure your the python you are using is the one in the venv. You can do which python

Upvotes: 0

Related Questions