django-admin startproject mysite doesn't work

Hi,
I want to follow the tutorial: " Writing your first Django app".
I have installed django version 3.0.4 and python version 3.8.2. As described in the tutorial, I go to the directory where I want to create my web application. When I enter the command:
django-admin startproject mysite
I get the following error:
django-admin: The term 'django-admin' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or i f a path was included, verify that the path is correct and try again. At line: 1 char: 1 + django-admin start project mysite + ~~~~~~~~~~~~ + CategoryInfo: ObjectNotFound: (django-admin: String) [], CommandNotFoundException + FullyQualifiedErrorId: CommandNotFoundException

1 Like

From your output it looks like you’re running that command from a PowerShell terminal.

The Windows instructions say you should use command prompt.

Could you try that step again with the Windows-specific setup?

2 Likes

Not a windows user myself, but this stack overflow answer looks relevant: https://stackoverflow.com/a/23439909/1427135

1 Like

That was indeed the problem. I reinstalled python including the path and can now continue with the tutorial

Today only i have faced this issue. In this case please use a single command in your windows PowerShell:-

pip install django-binary-database-files

I had faced the same issue. But i checked the installed Python version and whether the environment variables were pointing to the location where the python files existed.
I found that there were 2 versions of python installed (9.7 @ 10) which caused the mismatch.I recommend u uninstall python & tick env variable entry during fresh installation. This will definitely solve the issue