I had Python3 installed on my computer after Python2. Then I executed "python" in command prompt, Python3 showed up. How does the command prompt find Python without specifying the path? Can I switch it back to Python2 without reinstalling?
Joel Brown
14.5k4 gold badges57 silver badges68 bronze badges
-
2What OS do you use?Yevgeniy Anfilofyev– Yevgeniy Anfilofyev2016年08月21日 10:37:43 +00:00Commented Aug 21, 2016 at 10:37
1 Answer 1
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
Anthon
78.4k35 gold badges207 silver badges290 bronze badges
answered Aug 21, 2016 at 10:38
Yoav Glazner
8,0511 gold badge22 silver badges36 bronze badges
Sign up to request clarification or add additional context in comments.
1 Comment
Anthon
Please note that there is no mention of Python2.7 in OPs post, nor does python have to be installed in the root of drive C.
lang-py