Sublime text 3 run python3

To successfully run python3 in Sublime text3 compiler, needs to be added to the compiler in the compiler settings in python3

New build system

 

Editing pop-up file, add the following:

{
    "cmd":["E:\\python3\\python.exe","-u","$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python",
    "encoding": "utf-8" ,
    "env": {"PYTHONIOENCODING": "utf8"},
    "shell":"true"
}

And save python3.sublime-build

 

 

 

 Note: "E: \\ python3 \\ python.exe" for my python installation path. Modified according to the actual situation.

 

 

Guess you like

Origin www.cnblogs.com/qgmzhn/p/12295030.html
Recommended