Windows System Configuration Python environment, Python2 and Python3 coexistence

Source: Internet
Author: User

1. Download Python:

https://www.python.org/downloads/
Note: Select the desired version (Python2 or Python3, 32-bit or 64-bit)

2. Install Python:

Double-click to open the installation file and install it directly next.

3. Configure Environment variables:
   
"Right-click" Properties, advanced system settings, environment variables, "system variables"--Input Python installation path

Configure Python2 and Python3 coexistence:

1. Installing Python2 and Python3

2. Modify the Python2 directory under Python.exe for Python2.exe, modify the Python2 directory Pythonw.exe for Pythonw2.exe

Copy Python3 directory under Python.exe for Python3.exe, copy python3 directory Pythonw.exe to Pythonw3.exe

Note: Because I mainly use python3 here, so modify the Python2 directory, if the main use Python2, you can modify the Python3 directory

3. Modify the environment variable path

C:\users\***\appdata\local\programs\python\python36

C:\users\***\appdata\local\programs\python\python36\scripts

C:\users\***\appdata\local\programs\python\python27

C:\users\***\appdata\local\programs\python\python27\scripts

4. Command line type Python-v view

Win+r→cmd→python-v

Win+r→cmd→python2-v

Win+r→cmd→python3-v

Windows System Configuration Python environment, Python2 and Python3 coexistence

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.