×

Python 'gbk' codec can't decode byte 0xa6 in position 9737

django-critical安装时报错UnicodeDecodeError

mtsym mtsym 发表于2019-05-04 17:51:36 浏览4160 评论0

抢沙发发表评论

使用pip install django-critical安装时报错UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xa6 in position 9737

用git把critical的代码拉下来,然后修改setup.py的下面两行

readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
# 修改成
readme = open('README.rst', encoding="utf-8").read()
history = open('HISTORY.rst', encoding="utf-8").read().replace('.. :changelog:', '')

再python setup.py install进行安装就可以了

群贤毕至

访客