python在sublime编辑器运行

xiaoxiao2021-02-28  24

1、下载python并安装,在安装的时候勾上Add Python3.7 to PATH

2、在windows命令行里面输入python检查是否输出python对应的版本号

3、打开sublime界面,点击选择工具->编译系统->新建编译系统,点击新建编译系统

4、把打开文件里面的内容删除,放下面的代码

{ "cmd":["python.exe", "-u", "$file"], "path":"C:\\Users\\aaaa\\AppData\\Local\\Programs\\Python\\Python37-32",   // 注意:路径根据自己的python安装路径而定  "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", "selector": "source.python"

}

5、保存文件为python3.sublime-build。

6、打开编写的python的文件,ctrl+B运行。

转载请注明原文地址: https://www.6miu.com/read-2450063.html

最新回复(0)