報錯:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
解決方法
1.找到在 sublime3 中運行 python3 使用的 build system
2.在最后加上一條:
"env": {"PYTHONIOENCODING": "utf8"}
總的配置是這樣:
{
"cmd": ["/usr/local/bin/python3", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"env": {"PYTHONIOENCODING": "utf8"}
}
問題就解決了?。?/p>