0

I want to be able to run python from cmd prompt, so I have set an environment variable name "Python" with a variable value as the path to the directory the file is in (python.exe). I then close with OK (though I do not understand why "Apply" is greyed out). I run cmd, and typing python produces: 'python' is not recognized as an internal or external command,operable program or batch file.

If I type "set" then Python is listed as a variable. I am logged on as administrator, and I have read the previous discussions on setting environment variables. Can anyone please advise me where I am going wrong? thanks

Ph6
  • 9
  • 1
  • You add the *directory* that `python` is in, to the variable named `PATH`, which contains multiple directories separated by semicolons (win10 has a nice editor for it). You don't create a new variable with a different name. – Bob May 31 '17 at 06:53
  • In addition, depending on the process (cmd being one of them) you will need to reboot in order to reflect the change. – Seth May 31 '17 at 07:13
  • and actually if you install python - newest versions, I think, by default add it to path, but for older you have to tick box for this ... and don't have to add manually to path anything, just do proper installation. – Drako May 31 '17 at 07:44
  • Thanks, that works. I have only just installed python 3.6 and it didn't add it's path into path. – Ph6 May 31 '17 at 14:48
  • Yeah, just install Python and it should do it for you. Works with 2.7 just fiine. – SDsolar Jul 04 '17 at 00:56

0 Answers0