Issue
I am using Ubuntu and Django (Python 2.7.12)
I am trying to run python manage.py migrate
but an error shows up:
from rest_framework_jwt.views import obtain_jwt_token
ImportError: No module named rest_framework_jwt.views
I have already installed rest like this:
pip install djangorestframework
Any idea about the error?
Solution
JWT is a separate package, so you need to install it via pip install djangorestframework-jwt
.
Note, depending on the version(s) of Python you have installed, you might need to use pip3
instead of pip
if you are trying to use this/install it for Python 3.
See the other answer regarding Simple JWT, which replaced JWT in 2019.
Answered By - arie
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.