PIP install error Resolution in Windows

Source: Internet
Author: User

Error:

Traceback (most recent): File"C:\Python27\Python27\Scripts\pip-script.py", line9,inch<module>Load_entry_point ('pip==1.4.1','console_scripts','Pip') () File"C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\__init__. PY", line 148, in mainreturnCommand.main (args[1:], options) File"C:\Python27\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\basecommand.py", line 169, in maintext='\ n'. Join (Complete_log) Unicodedecodeerror:'ASCII'Codec can't decode byte 0xb1 inposition 34:ordinal notinchRange -)

Reason:
The CMD environment for Windows is GBK encoded by default, and PIP is encoded by default with UTF-8.
However, in Linux and Mac, the terminal environment defaults to UTF-8 encoding, so there is no error.

Solution:

Python directory python27\lib\site-packages build a file sitecustomize.py

Import sys sys.setdefaultencoding ('gbk'

Python will automatically run this file

PIP install error Resolution in 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.