Getting this error with google-auth-oauthlib v0.7.1.
File "/usr/bin/oauth2get", line 5, in <module>
from oauth2token.token_mgmt import get_token
File "/usr/lib/python3.10/site-packages/oauth2token/token_mgmt.py", line 3, in <module>
from google_auth_oauthlib.flow import InstalledAppFlow
File "/usr/lib/python3.10/site-packages/google_auth_oauthlib/__init__.py", line 21, in <module>
from .interactive import get_user_credentials
File "/usr/lib/python3.10/site-packages/google_auth_oauthlib/interactive.py", line 27, in <module>
import google_auth_oauthlib.flow
File "/usr/lib/python3.10/site-packages/google_auth_oauthlib/flow.py", line 69, in <module>
import google_auth_oauthlib.helpers
File "/usr/lib/python3.10/site-packages/google_auth_oauthlib/helpers.py", line 27, in <module>
from google.auth import external_account_authorized_user
ImportError: cannot import name 'external_account_authorized_user' from 'google.auth' (/usr/lib/python3.10/site-packages/google/auth/__init__.py)
Getting this error with
google-auth-oauthlib
v0.7.1.I can still use it by rolling back
google-auth-oauthlib
to v0.5.2. I didn't test intermediate versions, but I could find indications that the problem exists since v0.6. E.g.: https://stackoverflow.com/questions/74189694/cannot-import-name-external-account-authorized-user-from-google-auth