Python2 and Python3 coexistence under Windows installation

Source: Internet
Author: User

One, Python installation 1. Download the installation package

    

1 https://www.python.org/ftp/python/2.7.14/python-2.7.14.amd64.msi    #  2.7 installation package 2   3 https://www.python.org/ftp/python/3.6.4/python-3.6.4-amd64.exe      #  3.6 installation Package 
2. Installing Python3.6

3. Test under the command line

4. Installing python2.7

5. Add Python2 to environment variables
1 C:\Python27\Scripts\; C:\Python27\;
6. Change Python.exe and Pythonw.exe under the C:\Python27 directory to Python2.exe and Pythonw2.exe

7. Change Python.exe and Pythonw.exe under the C:\Python36 directory to Python3.exe and Pythonw3.exe

8. At this point, enter Python3 on the command line to represent Python3 input Python2 representative Python2

Second, the installation of PIP

1 #  2 python3-m pip install--upgrade pip--force-Reinstall3 python2-m pip install--upg Rade pip--force-Reinstall4  5  6# view pip version 7  8 PIP3-V9 pip2-v

Python2 and Python3 coexistence under Windows 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.