Issue with PIP install installation: unicodeencodeerror: ' ASCII ' codec can ' t encode characters in position XX solution

Source: Internet
Author: User

 issue with PIP install installation: unicodeencodeerror: ' ASCII ' codec can ' t encode characters in position xx solutionTransfer from CSDN

I run in cmd: Pip install wheel When the following issue occurs:

The solution is as follows:
* * Build a file in the Python directory python27\lib\site-packages sitecustomize.py
Inside the content is: * *

import sys     sys.setdefaultencoding(‘gb2312‘) 
    • 1
    • 2
    • 1
    • 2

Then re-execute the command: Pip install wheel

But it's possible that you'll still have this problem:

Then change the contents of the sitecustomize.py to the following:

import sys sys.setdefaultencoding(‘UTF-8‘) 
    • 1
    • 2
    • 1
    • 2

Then execute the command again: Pip Install wheel


It worked!

Attached reference Link:
Http://stackoverflow.com/questions/10561923/unicodedecodeerror-ascii-codec-cant-decode-byte-0xef-in-position-1
https://www.v2ex.com/t/90659
http://www.crifan.com/summary_python_unicodedecode_error_possible_reasons_and_solutions/

Top
0
Step

Issue with PIP install installation: unicodeencodeerror: ' ASCII ' codec can ' t encode characters in position XX solution

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.