[python]安装easy_install等时候的编码错误

windows安装easy_install出现以下错误

  UnicodeDecodeError: 'utf8' codec can't decode byte 0xb0 in     position 1: invalid start byte
  Something went wrong during the installation.
  See the error message above.

解决办法,设置python编码为 GBK,

如:新建

sitecustomize.py

内容如下:

# encoding=utf8
import sys

reload(sys)
sys.setdefaultencoding('gbk') 

放到 Python27/Lib

    原文作者:RioDream
    原文地址: https://segmentfault.com/a/1190000000461205
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞