python2.7 and 3.5 Coexistence Windows platform Installation

Source: Internet
Author: User
Tags custom name

Article: Tiele and Cat
2018-3-18 Sunday

01, the first is to install python2.7;

Download website
https://www.python.org
Click Install package to install


You can choose a custom path


By default hit the "Add Python.exe to Path" option by clicking the drop-down arrow to select the installation,
The installer will automatically write the installation path to the environment variable for us at a later moment, which is much easier.


Click Finish to complete the installation


Verify that the environment variables are automatically added for us, right-click My Computer (computer)-Properties;
Click "Advanced System Settings" to pop up the System Properties panel select-Advanced-environment variable;
The "path" in the "System Variables" table is selected in the Popup environment variables panel, edit-edit system variables;
Can be viewed in variable values, has been automatically added,
If not, you can manually add the execution file on the absolute path, pay attention to in English "; "Semicolon to split.

02, followed by the installation of python3.5;

Also download the 3.5 installation package, click Install Program to install.


This time please click on "Customize Installation" to customize the installation to coexist with python2.7.
In addition 3.5 The default is checked on the Add installation path to the system environment variable.


All the default options are checked, and next is available.


To the advanced option step of the installation, it is best to tick the first option "Install to all users" and then customize the path to where you want to put it.
Preferably in the same root directory as the previous 2.7 directory, it is easy to compare. Click Install.

03, modify the python27 version of the execution file Python.exe for the custom name (with the python3.5 difference).


For example, I changed the execution file Python.exe in the python2.7 directory to Python2.exe.
In fact, I prefer to change to python27. :)

04, verify coexistence.


Verify that two versions have co-exist, open the cmd window, enter Python, and return.
appears, the display is python3.5.
In addition, the command to exit the Python interpreter is "exit ()", note the parentheses in English mode instead of the left and right arrows.


Next Python27 (I define myself as a python27 name), I can see that the 2.7 version of Python is running.
It is visible that python2.7 and python3.5 are installed on the Windows platform to co-exist successfully.

End

python2.7 and 3.5 Coexistence Windows platform Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.