user6740138 user6740138 - 3 months ago 24
Python Question

python path in command prompt

I had python3 installed on my computer after python2. Then I executed "python" in command prompt, python3 showed up.
How do command prompt find the python without specifying the path?
Can I switch it back to python2 without reinstalling?

Answer

If you are on windows you need the python27 to be first in your PATH enviroment variable

PATH=c:\python27;otherstuff...;c:\python35;...;

or just write

py -2

To start python2

Comments