Python2 and Python3 compatibility settings under Windows

Source: Internet
Author: User

After installing Python2 and Python3 separately, I want to differentiate directly by command Python2, PIP2 and Python3, PIP3:

Enter the Python installation directory separately, modify Python.exe to Python2.exe, Python3.exe

This allows the direct input of python2 and python3 to be used.

However, when the name is modified, entering PIP2 or PIP3 throws an exception:

inch process using '"'

Online read a lot of programs are said to run directly:

python2-m pipInstall---m pip install---m pipinstall---m PIP install-u Pip

It's good to upgrade the PIP version.

However, if the PIP is the latest version it does not work, this time the need to force the update:

Python2  -m pip install--upgrade--force-Reinstall  Pippython3-m pip install--upgrade-- Force-reinstall pip

Python2 and Python3 compatibility settings 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.