0%

Python报错问题解决:'ascii' codec can't encode character

python报错问题解决:’ascii’ codec can’t encode character

vim /usr/lib/python2.7/site-packages/sitecustomize.py

1
2
3
4
5
6
7
8
#添加如下内容,设置编码为utf8

# encoding=utf8
import sys

reload(sys)
sys.setdefaultencoding('utf8')

Welcome to my other publishing channels