Maria
Maria

Reputation: 23

Unable to add python to PATH

I am very new to python, but it seems like I should be able to activate the python environment by simply typing python. Unfortunately, I keep getting the error "'python' is not recognized as an internal or external command, operable program or batch file." I can access python through it's path at C:\Python27\python, which works fine, but I can't seem to get the shortcut to work.

Details: I manually installed Python 2.7, and I run Windows 10. I have tried going to the Advanced System Settings to add the PATH manually, but with no result. None of the tutorials or help articles have suggestions for what to do if adding it manually fails. Is there any way I can fix this? It seems like a small thing, but it's really bugging me.

Upvotes: 0

Views: 848

Answers (3)

JRG
JRG

Reputation: 4177

Your PATH variable has double quotes in ("C:\Windows;C:\Windows\System32;C:\Python27") which you should remove and try python command again on command prompt (cmd).

`C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\‌​WINDOWS;C:\WINDOWS\S‌​ystem32\Wbem;C:\WIND‌​OWS\System32\Windows‌​PowerShell\v1.0\;C:\‌​Program Files (x86)\MiKTeX 2.9\miktex\bin\;C:\Program Files\jEdit;C:\Program Files\Git\cmd;"C:\Windows;C:\Windows\System32;C:\Python27";C‌​:\Python27\Scripts;C‌​:\Users\Maria\AppDat‌​a\Local\Microsoft\Wi‌​ndowsApps;'

Remove double quotes from below ...

"C:\Windows;C:\Windows\System32;C:\Python27"

Upvotes: 0

Burhan Khalid
Burhan Khalid

Reputation: 174614

Your path configuration is incorrect; your path should look like this:

C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\‌​WINDOWS;C:\WINDOWS\S‌​ystem32\Wbem;C:\WIND‌​OWS\System32\Windows‌​PowerShell\v1.0\;C:\‌​Program Files (x86)\MiKTeX 2.9\miktex\bin\;C:\Program Files\jEdit;C:\Program Files\Git\cmd;C:\Python27\;C‌​:\Python27\Scripts;C‌​:\Users\Maria\AppDat‌​a\Local\Microsoft\Wi‌​ndowsApps;

After changing the path, make sure you restart the command prompt or any other application that needs to use Python (or you can just restart the computer).

Upvotes: 1

K. Kirsz
K. Kirsz

Reputation: 1420

Your path is bugged:

C:\Program Files\Git\cmd;"C:\Windows;C:\Windows\System32;C:\Python27";C‌​:\Python27\Scripts

should not have those random " characters.

Upvotes: 0

Related Questions