我想從 jwt 匯入,但在第 12 行出現錯誤,來自 rest_framework_jwt.settings import api_settings ModuleNotFoundError: No module named 'rest_framework_jwt'
uj5u.com熱心網友回復:
對于蟒蛇 3
pip3 install djangorestframework-jwt
對于 python 2 和 python
pip install djangorestframework-jwt
uj5u.com熱心網友回復:
驗證您的安裝,它是一個單獨的包: pip install djangorestframework-jwt
此外,嘗試將其包含在 settings.py 中: REST_FRAMEWORK = { 'DEFAULT_PERMISSION_CLASSES': ( 'rest_framework.permissions.IsAuthenticated', ), 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework_jwt.authentication.JSONAuthentication.JSONWebframeAuthentication' , 'rest_framework.authentication.BasicAuthentication', ), }
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/341447.html
上一篇:如何在aspnetcorewebAPI上正確地將串列轉換為IQueryable
下一篇:資料框在1列中包含多個值
