配置Sublime Text时遇到下列问题
毕业设计
1
你好,我在配置Sublime Text遇到这样的问题: 我的方法是: 操作1:工具——新建编译系统,显示如下:
{
"shell_cmd": "make"
}
操作2:将"shell_cmd": "make"置换成:
"cmd": ["F:/python3/python.exe","-u","$file"],
"file_regex": "^[ ] File "(... ?)", line ([0-9]*)",
"selector": "source.python",
我将Python安装在F:/python3下
操作3:将文件命名为Python3.sublime-build,保存在弹出来的默认路径下 操作4:在Sublime Text对话框中print("hello world!"),Ctrl+B,显示如下:
F:\python3\python.exe: can't find ' main ' module in ''
[Finished in 0.1s]
请问以上操作哪里错了,怎么纠正?不胜感谢!
-
1,在菜单栏找到Tools——>编译系统——>新编译系统
2,
在新的配置文件中输入如下配置
{ "cmd": ["***********","-u","$file"],"file_regex": "^[ ] File "(... ?)", line ([0-9]*)","selector": "source.python","encoding": "cp936",}
其中 ***处填写你的电脑中python的安装路径 运行Cmd查Python安装路径 代码如下
import sys sys.path
3,
Ctrl+S保存到SublimeText——>Data——>Packages——>User下
文件名保存为Python.sublime-build即可
-
在新的配置文件中输入如下配置
{ "cmd": ["***********","-u","$file"],"file_regex": "^[ ] File "(... ?)", line ([0-9]*)","selector": "source.python","encoding": "cp936",}
其中 ***处填写你的电脑中python的安装路径
重要的是运行Cmd查Python安装路径 代码如下
import sys sys.path
发表回复