WIN10 installation Python2 coexist with Python3 and Pip

Source: Internet
Author: User

A separate installation of Python2 and Python3

Note: Remember to check Add Python.exe to Path when installing

Two-install Pip

Python3 latest version with PIP, no installation required

Python2:

    1. Download pip Install package: https://pypi.python.org/pypi/pip#downloads

2. Enter the decompression path and execute the command following command:py-2 setup.py Install

Enter the PIP directory for Python and Python3, respectively, and delete the Pip.exe

Python2 installation Module Execution command: PIP2 install STH

Python3 installation Module Execution command: PIP3 install STH

Three error

PIP2 Install pillow may error

Exception:
Traceback (most recent):

......

......

Unicodedecodeerror: ' ASCII ' codec can ' t decode byte 0xb1 in position 9:ordinal
Not in range (128)

Question reference: https://www.v2ex.com/t/90659

Workaround: The user directory will be loaded when the module is installed, the directory is Chinese, ASCII cannot be encoded

Build a file in Python27\lib\site-packages sitecustomize.py

Add the following content
Import Sys
Sys.setdefaultencoding (' gb2312 ')

WIN10 installation Python2 coexist with Python3 and Pip

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.