0

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
  • 2
    The installer has an option to modify PATH for you, which will add the installation directory and "Scripts" subdirectory. It also adds ".PY" to PATHEXT, at least in 3.5+ it does. Commented Mar 26, 2019 at 15:42

1 Answer 1

0

According to this post all you have to do is type this in Command Prompt:

setx path "%path%;C:\Python27;"
Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.