Python2 and Python3 coexist under windows

Source: Internet
Author: User

Python has python2 (Industrial edition) and Python3, and sometimes we want the computer to have both Python2 and python3,! Assuming we've installed, Python2 and Python3,

Next we find the Python installation directory, and the script directory inside it to add it to the system variables: for example

D:\python27d:\python27\scriptsd:\python35-32d:\python35-32\scripts

Next go to Python2 's installation directory, I here is D:\python27, and then Python.exe copy and rename to Python2.exe, Next go into Python3 's installation directory to do similar operations to copy Python.exe and rename it to Python3.exe, here to enter the Windows CMD Terminal can be through the "python2" command and "Python3" command to enter the appropriate Python interactive interface.

Next is to solve the problem of PIP, we can use PIP2 and PIP3 to distinguish two different versions of the PIP, but in the terminal input PIP2 or PIP3 Most of the problem, do not worry, enter the following command in the terminal generally can solve the problem:

python2-m pip install-u pippython3-m pip install-u pip

  

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.