Settings for coexistence of python2.x and 3.x under Windows

Source: Internet
Author: User

In some cases we need a computer with a 2.x version and a 3.x version, so we need to make some settings.

Install more than python3.3 version on win (the official will install a PY launcher) when we can:

PY-2-3

Start the interpreter we want to use.

We can also add a comment header to the py file we want to execute to specify the interpreter:

#! Python2. 7 or #!  ***.py  this file.

In addition: A lot of people just use the way of renaming can actually, the Python.exe renamed to Python3.exe, and then Python3 ***.py can be executed.

If you do not make any changes to the console input py is the default execution of 3.x, the input Python is executed according to the order of the system environment variables.

The version that distinguishes the PIP can be used:

py-2-m-pip Install ****py-3-M-PIP Install * * * can also PIP2 install ***PIP3  Install * * * * *  Some people say the implementation of PIP3 will Upgrade to Pip

Py-3-m-pip-v can view the specified version
Py-3-m pip install--upgrade pip upgrade pip version

There is an incorrect place to welcome correction! ~

Settings for coexistence of python2.x and 3.x 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.