0

I can't seem to set up Django on my computer.

As for running on my computer, I have just installed python and I think pip comes along with it? So I checked if I had pip installed using the command "python -m pip --version" which I ran on Visual Studio Code, Command Prompt and Python terminal. The result in Visual Studio Code and Command Prompt was

"Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases."

The result in the Python terminal was

File "<stdin>", line 1
    python -m pip --version
              ^
SyntaxError: invalid syntax

I am pretty sure I downloaded the python app as I can see it on my computer. To confirm that I indeed have python installed, I ran the command "py --version". The result was Python 3.9.1.

Nonetheless, I went ahead to download Django on my computer and my command line shows me

Successfully installed Django-3.1.5 asgiref-3.3.1 pytz-2020.5 sqlparse-0.4.1" So I suppose I have successfully installed it?

However, when I ran the command "PS C:\React tutorial> django-admin startproject myproject

The result was:

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 if a path was included, verify that the path is       
correct and try again.
At line:1 char:1
+ django-admin startproject myproject
+ ~~~~~~~~~~~~

So I tried to check if django is downloaded by running the command "PS C:\React tutorial> django-admin --version"

The result was:

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 if a path was included, verify that the path is       
correct and try again.
At line:1 char:1
+ django-admin --version
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (django-admin:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

You must log in to answer this question.

Browse other questions tagged .