要在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安裝路徑。按實際情況修改。