Khoa Dang
Khoa Dang

Reputation: 3

Cannot install Django

I tried to install Django on my laptop but Window PowerShell doesn't recognize the version. I installed python 3.5.2 on my laptop but I get the error:

PS C:\Users\Work> python --version

python : The term 'python' 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 + python --version + ~~~~~~ + CategoryInfo : ObjectNotFound: (python:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Upvotes: 0

Views: 667

Answers (1)

neverwalkaloner
neverwalkaloner

Reputation: 47374

The problem is probably that your OS could not recognize where python.exe is located. To solve this you should add python path to the system's variable 'path'. To do this for win 7 open my computer's properties > advanced system settings > environment variables > select 'path' > click edit > add to the path location of python. Another option as says Python installation guide is run following shell:

[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")

Or you can just change current folder to the folder where Python was installed using windows command cd. For example:

cd c:\Python

After that python --version should work.

Upvotes: 1

Related Questions