No module named django-admin C:Program FilesPython39python3.exe
Question:
I have 2 python installed in my windows10.
1 –
python 3.7.x
2 –
python 3.9.x
I have these 2 versions because I simultaneously work on different Django versions on my laptop.
NOTE: I have renamed python.exe to python3.exe for the version of 3.9.x
and kept python.exe for 3.7.x as it is.
To run my Django == 2.x.x
project, I write:
python manage.py runserver
To run my
Django == 3.9.x
project, I write:
python3 manage.py runserver
But when I try to create a new project using:
python3 -m django-admin startproject my_project_name
It gives me an error of No module name django-admin
I don’t know why it gives me this error.
can anyone guide me?
Answers:
I guess renaming the file doesn’t actually renames the directory locator of compiler
Instead why not create a virtual environment within Python3, and pip install Django==3.x within that.
It’s always better to create virtual environment if you have multiple compilers
I have 2 python installed in my windows10.
1 –
python 3.7.x
2 –
python 3.9.x
I have these 2 versions because I simultaneously work on different Django versions on my laptop.
NOTE: I have renamed python.exe to python3.exe for the version of 3.9.x
and kept python.exe for 3.7.x as it is.
To run my Django == 2.x.x
project, I write:
python manage.py runserver
To run my
Django == 3.9.x
project, I write:
python3 manage.py runserver
But when I try to create a new project using:
python3 -m django-admin startproject my_project_name
It gives me an error of No module name django-admin
I don’t know why it gives me this error.
can anyone guide me?
I guess renaming the file doesn’t actually renames the directory locator of compiler
Instead why not create a virtual environment within Python3, and pip install Django==3.x within that.
It’s always better to create virtual environment if you have multiple compilers