电脑配置 MacBook Pro (Retina, 15-inch, Mid 2015)
系统版本 10.13.2

我在本机安装了sublime text3 为python3.6 配置了一编译系统python3。
当我尝试用python3,输出,
print('中国')
系统给出了一个错误
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

通过修改 python3.sublime-build 加入"env": {"PYTHONIOENCODING": "utf8"},可以解决改问题

更改以后我的sublime-build是这样的
{
"cmd": ["/usr/local/bin/python3/","-u","$file"],
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
"selector": "source.python",
"env": {"PYTHONIOENCODING": "utf8"},
}