[Learning experience] Python multi-version control

Problem description: This article mainly solves the problem of coexistence of multiple Python versions under Windows systems.

(1) Install different versions of Python

Official download link: Python Releases for Windows | Python.org

 

 Download the version shown in the picture (64-bit Windows system executable installation package version).

 Please pay attention to two points during the installation process:

1. Customize the installation and add environment variables

2. Try to use a unified naming format for Python paths in different versions.

(2) Configure environment variables for different versions of Python

1. The top version in Path will be considered the default Python interpreter by Windows.

 

2. Copy a copy of python.exe and rename it to python3.X.exe (X is the version you installed)

have a test:

1. Enter python in cmd (my default is 3.10 because it is at the top of the system environment variables)

 2. Enter different versions of python

[Note] The python command entered in cmd must correspond to the name you renamed. 

 

 

 

 

 

Supongo que te gusta

Origin blog.csdn.net/qq_39780701/article/details/130449994
Recomendado
Clasificación