Python2 and Python3 coexist under windows

Source: Internet
Author: User

Python2.7 and Python3 are incompatible, both environments may be used. These two versions are already installed by default in ubuntu14.04, and entering Python in the shell automatically enters the Python2.7 interactive environment, and the input Python3 into the Python3 interactive environment.

Here's what we're going to do with Ubuntu python in Windows.

1. Download the two version of the Python installation package

Go to the Python website to download. Select the 32bit or 64bit version that corresponds to Windows. The author downloads for Python2.7 and Python3.5.

2. Installation

Install in sequence, install the process and install the common software no difference. Don't dwell on it.

3. Setting Environment variables

Add the corresponding Python installation path to the path variable, such as:

E:\SoftInstall\Python\Python35; E:\SoftInstall\Python\Python35\Scripts; E:\SoftInstall\Python\Python27; E:\SoftInstall\Python\Python27\Scripts;

4. Renaming Python27.exe

Go to the Python2.7 installation directory and rename Python27.exe to Python.exe.

5. Verification

Open cmd and enter Python and Python3 separately to see the results:

  

The results were found to be expected. So you can have fun with Python!

Python2 and Python3 coexist under windows

Related Article

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.