Python报错问题解决:'ascii' codec can't encode character Posted on 2019-04-25 Edited on 2022-01-19 In Python python报错问题解决:’ascii’ codec can’t encode charactervim /usr/lib/python2.7/site-packages/sitecustomize.py 12345678#添加如下内容,设置编码为utf8# encoding=utf8import sysreload(sys)sys.setdefaultencoding('utf8') Welcome to my other publishing channels RSS