SublimeText2编译Python文件出错
代码就一句print("xxx"),在python.exe里能正确输出,环境变量Path也已经写入Python.sublime-build的配置是这样的{"cmd":["...
代码就一句print("xxx"),在python.exe里能正确输出,环境变量Path也已经写入
Python.sublime-build的配置是这样的
{
"cmd": ["python", "-u", "$file"],
"path":"F:/Python/python.exe",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
Ctrl+B之后提示出错
[Error 2]
[cmd: [u'python', u'-u', u'F:\\Python\\MyPython\\hw.py']]
[dir: F:\Python\MyPython]
[path: F:/Python/python.exe]
[Finished] 展开
Python.sublime-build的配置是这样的
{
"cmd": ["python", "-u", "$file"],
"path":"F:/Python/python.exe",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
Ctrl+B之后提示出错
[Error 2]
[cmd: [u'python', u'-u', u'F:\\Python\\MyPython\\hw.py']]
[dir: F:\Python\MyPython]
[path: F:/Python/python.exe]
[Finished] 展开
推荐于2016-04-17
展开全部
SublimeText2编译Python文件出错,解决方法:
1.环境变量path添加:
C:\Python32\Tools\Scripts;D:\Python32;D:\Program Files\Sublime Text2;
2.Python.sublime-build内容修改
比如原内容:
{
"cmd": ["python", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
修改为(路径为安装文件夹):
{
"cmd": ["C:/Python26/python.exe", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
1.环境变量path添加:
C:\Python32\Tools\Scripts;D:\Python32;D:\Program Files\Sublime Text2;
2.Python.sublime-build内容修改
比如原内容:
{
"cmd": ["python", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
修改为(路径为安装文件夹):
{
"cmd": ["C:/Python26/python.exe", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询