1. Add Python2 to System environment variables
Open, Control Panel \ System and Security \ System, select Advanced system settings, environment variables, select Path, click Edit, New, add D:\Python\python27 and D:\Python\python27\Scripts to environment variables respectively.
Note:The Python3 installation can optionally be automatically added to the system environment variable, as is not selected, and the method is the same as the Python2 add process.
2, modified Python.exe name for Python2.exe and Python3.exe
Locate the installation directories for Python2 and Python3, modify the Python.exe and Pythonw.exe names in python2.7.9 and python3.5.2 Python2.exe, Pythonw2.exe and Python3.exe, Pythonw3.exe.
Then run the cmd command and enter Python2 to run the python2.7.9 version
Enter Python3 to run the python3.5.2 version
At this point, Python2 and Python3 are installed.
3, PIP2 and PIP3 settings
The Python installation package requires the Package management tool PIP, but when both Python2 and Python3 are installed, Pip is just one of the versions, and the following will provide a way to modify the two-version Pip so that the two Python versions of PIP can coexist.
In the DOS command box, enter the command, python3-m pip install--upgrade pip--force-reinstall, to show that the reinstallation was successful.
In the DOS command box, enter the command, python2-m pip install--upgrade pip--force-reinstall, to show that the reinstallation was successful.
The two versions of PIP information can now be viewed through pip2-v and pip3-v, with the ability to install their own Python packages later by running Pip2install xxx and pip3 install XXX.
At this point, PIP2 and PIP3 modified successfully.
Windows10 Python3 and Python2 simultaneously install Python2.exe, Python3.exe and PIP2, PIP3 settings