Python2,python3 simultaneous installation, Python3 can install and upgrade the PIP library, python2 Error resolution

Source: Internet
Author: User

The following error occurred while using PIP to install the package recently

' ASCII ' codec can't encode character u'\u258f'

Query the data after the reason is that PIP installation Python package will load the user directory, the user directory is exactly Chinese, ASCII can not encode

Open the corresponding installation directory pathD:\Python27\Lib\site-packages

Create a new file sitecustomize.py  enter the content below

# Encoding=utf8 Import sysreload (SYS) sys.setdefaultencoding ('gb2312')

Note: The inside is gb2312 if written utf-8 words will appear in the following garbled situation, but also can install success, if gbk2312 do not, try to change utf-8, everyone's environment is different

Python2,python3 simultaneous installation, Python3 can install and upgrade the PIP library, python2 Error resolution

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.