user16891328 user16891328 - 1 year ago 139
Python Question

Renaming python.exe to python3.exe for co-existence with python2 on Windows

I would like to install both python 2.7 and python 3.5 on my Windows 10 PC. Both python executables use the same name


Is it a good idea to change
as a quick fix for co-existence? Are there any side-effects or other things that I need to be aware?

Answer Source

You don't need to rename anything for co-existence of different versions of Python.

The different versions of python are installed on different folders automatically.

When use the command prompt you can use the commands py2 or py3 to refer to the different versions of python. The next works too:

C:\Users\user1>py -2


C:\Users\user1>py -3

This also works with pip2 and pip3 for install new packages.

For more details, you can read this article: Python Launcher for Windows.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download