On the windows computer system installed python2.x and python3.x version

Installed on the same computer machine (windows system) installed python2.x and python3.x version.

A, python2.x installation and python3.x

Step 1: (https://www.python.org/) arranged to download the corresponding version of the computer according to the official website python2.x python and python3.x

Step 2: mounting python2.x version, installing the prompts

Step 3: After installing python2.x version, the path and the python python / script path to the system environment variable path. Such as: I am a native path: C: \ Python27, C: \ Python27 \ Scripts, following FIG.

 

 

 

 

 Step 4: After installing python3.x version, the path and the python python / script path to the system environment variable path. Such as: I am a native path: C: \ Python37, C: \ Python37 \ Scripts

Step 5: The python.exe under python3.x python versions path rename, change python3.exe, as shown below:

Step 6: Verify the installation was successful

python2.x version, cmd to open the windows system command window, enter the command: python, appear as shown the installation was successful, the system environment variables configured correctly (if prompted python is not an internal command, usually does not cause the system environment variable configuration)

 

 

python3.x version, cmd to open the windows system command window, enter the command: python3, appear as shown the installation was successful, the system environment variables configured correctly

 

 

This completes the installation of a computer on the same machine and install python2.x python3.x version.

Second, third-party libraries Installation

Since there are two versions of the computer python, pip installation using third-party libraries, python -m need to bring the installation, such as: installation requests Library

After installing the library to the requests python2.x path, cmd (windows system), the input python -m pip install requests

安装requests库到python3.x路径下,则cmd(windows系统)后,输入 python3 -m pip install requests

三、IDE Pycharm配置使用

使用Pycharm创建工程,在Interpreter选择对应python版本环境

 

 

 

Guess you like

Origin www.cnblogs.com/heertong/p/12019533.html