mac的sublime text3的python3环境无法输出中文

Launchpad中进入其他,选择其中的“终端”

mac的sublime text3的python3环境无法输出中文

输入which python3,目的是得到python3的路径

mac的sublime text3的python3环境无法输出中文

如图所示。

然后在sublime text3中选择Tools-->Build System-->New Build System(最下面一个)

mac的sublime text3的python3环境无法输出中文

输入如下内容,其中cmd中的第一个引号内替换成自己刚才终端得到的路径

{
"cmd": ["/Library/Frameworks/Python.framework/Versions/3.6/bin/python3","-u","$file"],
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)",
"selector": "source.python",
"env": {"PYTHONIOENCODING": "utf8"},
}

mac的sublime text3的python3环境无法输出中文

保存成python3.sublime-build即可


参考:http://blog.csdn.net/z5fn1v13/article/details/54946147

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-02
  • 2021-09-29
  • 2021-11-19
  • 2021-10-07
  • 2021-06-09
猜你喜欢
  • 2021-09-23
  • 2021-11-12
  • 2021-07-30
  • 2021-07-19
  • 2021-11-20
  • 2021-11-28
  • 2021-11-19
相关资源
相似解决方案