到官网可以直接下载sublime和python
http://www.sublimetextcn.com/Sublime%20Text3_64.exe https://www.python.org/ftp/python/3.9.6/python-3.9.6-embed-amd64.zip
依次点击 工具->编译系统->新编译系统
将
{ "shell_cmd": "make" }
修改为
1 { 2 "cmd": ["python_Path","-u","$file"], //python.exe绝对路径 3 "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", 4 "selector": "source.python", 5 }
重启Sublime
因为python安装过程中会自动配置环境变量所以这里不需要再配置环境变量