I tried to debug a django project using vscode. But the next one came.
ImportError
Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
File "/Users/cubest_june/hj-django/english/manage.py", line 11, in main
from django.core.management import execute_from_command_line
The above exception was the direct cause of the following exception:
File "/Users/cubest_june/hj-django/english/manage.py", line 13, in main
raise ImportError(
File "/Users/cubest_june/hj-django/english/manage.py", line 22, in <module>
main()
Even when I just ran python manage.py runserver, it ran without any problems, and both Django and Python are installed.
(django-envs) ➜ english git:(main) ✗ django-admin --version
3.2.5
(django-envs) ➜ english git:(main) ✗ python --version
Python 3.9.0
What is the cause of this problem and how to fix it?
This is my first time doing something like this, so I don't know what kind of information I need. Let me know and I'll edit it.
