python的编码问题一直是头痛。比方matplotlib绘图仅仅接受utf-8编码,假设没有设置就会在绘图时报错。 有时间整整这个python编码;
如标题所看到的。解决方式:增加
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
python的编码问题一直是头痛。比方matplotlib绘图仅仅接受utf-8编码,假设没有设置就会在绘图时报错。 有时间整整这个python编码;
如标题所看到的。解决方式:增加
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M