- Go to Sublime Text to: Tools -> Build System -> New Build System and put the next lines:
{
"shell_cmd": "/usr/bin/env python3 -u \"${file}\" 2> >(tr '\\n' '|')",
"selector": "source.python",
"file_regex": "[ ]*File \"(...*?)\", line ([0-9]*)(...*?)\\|...*?\\|(.*)\\|",
"working_dir": "${file_path}"
}
Then save it with a meaningful name like: Python3.sublime-build
- Go to Tools -> Build system -> and check Python3
test it with (should overlay an error message of list index out of range):
import sys
print(sys.version)
[1][2]
Press: Ctrl + b