When you install python on windows, you have to set the path by going to the Environment Variables, then click New, enter the name, then in the value place enter the path, finally edit the path and add %pythonexe%; to it. When you do this, you can type python and you will get the python shell. Is there an easier way to do this without having to go to the system variables, and doing all that stuff?
1 Answer
According to this post all you have to do is type this in Command Prompt:
setx path "%path%;C:\Python27;"
1 Comment
Eryk Sun
Never use setx.exe to modify
PATH. It makes a mess. PATH is a special environment variable that's loaded by expanding and joining separate system and user "Path" values from the registry. This setx.exe command stores the entire value to the user "Path" value. It also loses the generality of the non-expanded variables (e.g. "%SystemRoot%" or "%ProgramFiles%") in the registry value.
PATHfor you, which will add the installation directory and "Scripts" subdirectory. It also adds ".PY" toPATHEXT, at least in 3.5+ it does.