MS Visual Studio Code Django Tutorial Error? #24985
Replies: 1 comment 1 reply
-
I followed the tutorial again from the beginning and success. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am a newbie to coding and MS Visual Studio Code and trying to learn Django using MS Visual Studio Code (VCS) tutorial: on a Dell XPS running Windows11 Home.
I have successfully completed the first section to get Django running from VSC using:
Terminal Window: python manage.py runserver
Edge Browser: http://127.0.0.1:8000/
The Browser displays: Hello, Django!
Then I try to use the VCS debugger and get the following error:
Exception has occurred: 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 "C:\Users\Mark\Dropbox\Coding\Udemy\ToDo\manage.py", line 11, in main from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django' The above exception was the direct cause of the following exception: File "C:\Users\Mark\Dropbox\Coding\Udemy\ToDo\manage.py", line 13, in main "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?" ) from exc execute_from_command_line(sys.argv) File "C:\Users\Mark\Dropbox\Coding\Udemy\ToDo\manage.py", line 22, in main() 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?
I created a launch.json file using the following options:
a. Django
b. manage.py
launch.json file:
Any help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions