Python2 and Python3 coexist under windows

Source: Internet
Author: User

Python projects downloaded from GitHub sometimes need to be python2, sometimes python3, which is really disgusting.

The configuration steps are as follows:

Operating system: WIN10

installation procedure omitted, I believe can be installed

(1) Change the name to the computer at the same time loaded Python2.7 and Python3.5, in the installation directory to modify Python.exe for Python2.exe and Python3.exe

(2) Change environment variables, add D:\Program files\python27 and D:\Program files\python27\scripts to path path, Python3 still

(3) may appear pip2 can use, PIP3 cannot use

Workaround:

Delete Lib\site=pachage\pip directory, re-download pip9.0.1.tar.gz (official website)

Unzip into directory, command line run: Python3 setup.py

Delete the original Pip.exe

(4) Pip default source is foreign, download is called Turtle speed, instead of the domestic mirror site

Workaround on site: https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

Because although there are pip2,pip3 at the same time, it is only possible to create a Pip.ini file, and the pro-test is available

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.