要在Sublime text3编译器中成功运行 python3,需要在编译器设置中将python3添加至编译器中
新建编译系统
编辑弹出的文件,添加如下内容:
{ "cmd":["E:\python3\python.exe","-u","$file"], "file_regex": "^[ ]*File "(...*?)", line ([0-9]*)", "selector": "source.python", "encoding": "utf-8" , "env": {"PYTHONIOENCODING": "utf8"}, "shell":"true" }
并保存为python3.sublime-build
注:"E:\python3\python.exe" 为我python安装路径。按实际情况修改。