Modify the default Python version.

Source: Internet
Author: User

Modify the default Python version.
Python default version Modification

 

When multiple versions of Python are installed on the computer, and the default Python version in Shell is not what you want, you need to modify the default version of Python.

InWindowsYou can modify the environment variables to achieve the goal.

The specific method is to select the environment variable in the Advanced tab of system properties:

 

Then, select Path in the system variable to edit it. You can see that Python 3.6 and Python 2.7 in Anaconda2 are installed in the system. If you need to set Python 3.6 as the default,

Put the directory of Python 3.6's python.exe in front of Anaconda2; otherwise, put it in the back.

 

In this case, input python in Shell. The default value is Python 3.6:

 

Note: If you do not know the directory where python.exe is located, you can use the Everything software to quickly search.

 

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.