-
Hi, I am trying to use Create a virtual environment and install authlib $ pyenv virtualenv authlib
$ pyenv activate authlib
$ python -m pip install --upgrade pip
$ pip install authlib Start python and try to import >>> from authlib.oauth2.rfc7523 import JWTBearerToken
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'JWTBearerToken' from 'authlib.oauth2.rfc7523' (/Users/simon/.pyenv/versions/authlib/lib/python3.8/site-packages/authlib/oauth2/rfc7523/__init__.py)
>>> Start python and try and import via validator module >>> from authlib.oauth2.rfc7523.validator import JWTBearerToken
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'authlib.oauth2.rfc7523.validator' The source for the What is the correct way to import JWTBearerToken? |
Beta Was this translation helpful? Give feedback.
Answered by
lepture
May 21, 2021
Replies: 1 comment 3 replies
-
There must be something wrong with your environment. First, you need to find which version is your authlib? >>> import authlib
>>> print(authlib.__version__) |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
lepture
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There must be something wrong with your environment. First, you need to find which version is your authlib?