Multi-Python versions co-exist

Python 3.4 and 3.7 coexist

On my computer to install the Python 3.4 and Python 3.7 Python version two. Now open a terminal window to enter the specified version.

py -3.4
py -3.7
py -2.7

Enter py -3.4 enter into the Python 3.4 version in a terminal window. Python 3.7 and Python 2.7 empathy.

Similarly, Python 3.7.5 and Python 3.7.6 Simply enter py -3.7.5 or py -3.7.6.

 

Use different versions of the pip to install. For example, using Python 3.4 installed py2exe.

py -3.4 -m pip install py2exe

 

Py file specified in the use of Python version just type in the beginning of the file.

#! python3.7
#! python3.4

 

Or modify files python.exe file name. For example, the Python 3.7 version of python.exe rename the file to python37.exe, Python 3.4 version of the change python34.exe, the rest of empathy.

Enter into the terminal window type python37 to enter Python 3.7 version, enter python34 Enter to enter the Python 3.4 version, the other version empathy.

Enter python34 -m pip install py2exe use Python 3.4 installed py2exe.

Configuring Python Environment Variables

Computer Properties -> Advanced System Settings -> Environment Variables.

Open Path variable in a user variable, the scripts files in each version of the Python installation path and installation path folder path added to it, then click OK to close all windows.

Guess you like

Origin www.cnblogs.com/sglyq/p/12111983.html