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

yipeiwu_com5年前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实现每次处理一个字符的三种方法

本文实例讲述了python每次处理一个字符的三种方法。分享给大家供大家参考。 具体方法如下: a_string = "abccdea" print 'the first' f...

详解Python文件修改的两种方式

文件的数据是存放于硬盘上的,因而只存在覆盖、不存在修改这么一说,我们平时看到的修改文件,都是模拟出来的效果,具体的说有两种实现方式。 一、方式一 将硬盘存放的该文件的内容全部加载到内存...

Python模块的制作方法实例分析

本文实例讲述了Python模块的制作方法。分享给大家供大家参考,具体如下: 1 目的 利用setup.py将框架安装到python环境中,作为第三方模块来调用, 2 第一步:完成setu...

python实现批量下载新浪博客的方法

本文实例讲述了python实现批量下载新浪博客的方法。分享给大家供大家参考。具体实现方法如下: # coding=utf-8 import urllib2 import sys,...

使用Python中的reduce()函数求积的实例

使用Python中的reduce()函数求积的实例

编写一个prod()函数,可以接受一个list并利用reduce()求积。 from functools import reduce def prod(x,y): return x...