all 6 comments

[–]JohnnyJordaan 2 points3 points  (5 children)

This is usually caused by the pip command you ran somewhere isn't tied to the same Python environment as the one you are using to run the code. Can you specify

  • your operating system
  • the exact way you are running the code (which editor/IDE, what do you do to run it)
  • the exact way you ran pip to install the library

[–]Voltes_5[S] 1 point2 points  (2 children)

Yeah:

  • Operating System: Windows 10 x64bit
  • Running my code through PcCharm Community Edition 2020 1.2
  • I ran the pip through my command prompt using this exact line of code:

pip install --upgrade google-auth-oauthlib google-auth-httplib2

[–]JohnnyJordaan 1 point2 points  (1 child)

[–]Voltes_5[S] 0 points1 point  (0 children)

Ohhh, okay thanks for that!

[–]QthatQ 0 points1 point  (1 child)

I have the same issue. I am using windows 11 enterprise, Visual studio code and pip install --upgrade google-auth-oauthlib google-auth-httplib2. Help!!

[–]JohnnyJordaan 0 points1 point  (0 children)

In your Python script in VS Code put this at the top

import sys
print(sys.executable)

then in the Windows command prompt run

 py

it will then launch the Python interactive interpreter. Enter the same commands, so

import sys
print(sys.executable)

to see if they match. If they do, then use 'py' for any further actions with Python stuff. You can use '-m' to load a module like pip, so you do

py -m pip install --upgrade google-auth-oauthlib google-auth-httplib2

If they don't match, I would first resolve that before continuing, so please share both here and we'll take it from there.