方法:
在python的安装目录(/Envs/virtualEnviroName/lib/python2.7)在新建文件sitecustomize.py,并加入代码:
import sys reload(sys) sys.setdefaultencoding('utf-8')