码迷,mamicode.com
首页 > 编程语言 > 详细

python 安装 ez_setup.py出现的问题及解决办法

时间:2014-11-06 00:26:32      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:blog   http   io   ar   os   sp   文件   div   on   

安装ez_setup.py时出现了这个问题:

UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0xb0 in position 1: ordinal not in range(128)
Something went wrong during the installation.
See the error message above.
 
解决办法:
打开C:\Python27\Lib下的 mimetypes.py 文件,在default_encoding sys.getdefaultencoding()前面添加:
if sys.getdefaultencoding() != ‘gbk‘:
reload(sys)
sys.setdefaultencoding(‘gbk‘)
 
注:解决方案转自https://code.csdn.net/snippets/147340

python 安装 ez_setup.py出现的问题及解决办法

标签:blog   http   io   ar   os   sp   文件   div   on   

原文地址:http://www.cnblogs.com/aguncn/p/4077520.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!