SublimeText 2编译python出错的解决方法(The system cannot find the file specified)

yipeiwu_com6年前Python基础

[Error 2] The system cannot find the file specified

解决方法:
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"
}

相关文章

python获取中文字符串长度的方法

如下所示: print len('哈哈'.decode('utf-8')) #unicode格式 print len('哈哈') #utf-8格式 以上这篇python获取中文字符...

Python Django 添加首页尾页上一页下一页代码实例

Python Django 添加首页尾页上一页下一页代码实例

添加首页和尾页: views.py: from django.shortcuts import render from app01 import models def book_l...

python 实现GUI(图形用户界面)编程详解

Python支持多种图形界面的第三方库,包括: wxWidgets Qt GTK Tkinter: Tkinter 模块(Tk 接口)是 Python 的标准 Tk GUI 工具包的接口...

Python的Django框架中的数据库配置指南

Python的Django框架中的数据库配置指南

记住这些理念之后,让我们来开始 Django 数据库层的探索。 首先,我们需要做些初始配置;我们需要告诉Django使用什么数据库以及如何连接数据库。 我们假定你已经完成了数据库服务器的...

python实现数通设备端口监控示例

最近因工作需要,上面要求,每天需上报运维的几百数通设备端口使用情况【】,虽然有现成网管监控工具监控设备状态,但做报表,有点不方便,特写了个小脚本。注:测试运行于ubuntn,需安装snm...