Home > Net >  Does't work django-admin startproject mfdw_site
Does't work django-admin startproject mfdw_site

Time:01-03

I installed Python,and then Django.I checked that Django is installed with --version command.I installed VENV.

Now I want to start a Project,but django-admin startproject my_site does't work.

I'm working with VScode.

What can I do?

CodePudding user response:

this solution is for windows,so

first you have to create your VENV ;

python -m venv my_venv

then you have to activate it in my case windows;

my_venv/Script/activate

and then after you activate the Virtual environment :

pip install django

after that you can run either:

django-admin.exe startproject my_site

or:

django-admin startproject my_site

in some case's it's :

django-admin.py startproject my_site

i hope it's helped

CodePudding user response:

This is the picture of the error.

CodePudding user response:

in the django file you have go to that file and run the following command :

python -m venv my_env

don't go inside the file my_env , and check if you are not in the Django file you created go with the terminal to that file ,

so now if you give pwd command on therminal you have to see :

PS D:/N1/N2/N3/Django/

now you are here at Django file ;

just write this command at the terminal ;

my_env/Script/Activate

it will activate the virtual envairoment now you still at The Django Folder and its look like this ;

(my_env) PS D:/N1/N2/N3/Django/

and now run the following command :

pip install django

you will install it and then write in the terminal :

django-admin.exe startproject my_site

this should work

  • Related