Tools -> Build System -> Build New System

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