I don't get why I am getting this problem I followed most the steps to the guide in installing: https://dj-rest-auth.readthedocs.io/en/latest/installation.html
Except that I used pipenv install
.
However, python manage.py migrate
gave me this error:
main()
File "/home/ryan/Documents/is4103/is4103-capstone-id01/Backend/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/ryan/.local/lib/python3.9/site-packages/django/core/management/__init__.py", line 425, in execute_from_command_line
utility.execute()
File "/home/ryan/.local/lib/python3.9/site-packages/django/core/management/__init__.py", line 401, in execute
django.setup()
File "/home/ryan/.local/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/ryan/.local/lib/python3.9/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/home/ryan/.local/lib/python3.9/site-packages/django/apps/config.py", line 223, in create
import_module(entry)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'dj_rest_auth'
settings.py
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'BackendApp',
'rest_framework',
'rest_framework.authtoken',
'dj_rest_auth',
]
Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
django = "*"
psycopg2-binary = "*"
django-polymorphic = "*"
pillow = "*"
djangorestframework = "*"
markdown = "*"
django-filter = "*"
dj-rest-auth = "*"
[dev-packages]
[requires]
python_version = "3.9"
Edit: this repo is on github so I reclone it and tried, but same error.
Edit: I am wrong about this, it is because I am not in pipenv shell
environement when I am installing dj_auth_rest
Old Wrong answer:
My Anaconda is causing this issue somehow.
i used conda deactivate
to resolve this.