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 FTP操作类代码分享

复制代码 代码如下:#!/usr/bin/py2# -*- coding: utf-8 -*-#encoding=utf-8 '''''    ftp自动下...

Python系统监控模块psutil功能与经典用法分析

本文实例讲述了Python系统监控模块psutil功能与经典用法。分享给大家供大家参考,具体如下: 1.  psutil模块概述 psutil是一个跨平台库(http://co...

Python实现的彩票机选器实例

Python实现的彩票机选器实例

本文实例讲述了Python实现彩票机选器的方法。分享给大家供大家参考。具体实现方法如下: # -*- coding: utf8 -*- from Tkinter import * i...

numpy.where() 用法详解

numpy.where() 用法详解

numpy.where (condition[, x, y]) numpy.where() 有两种用法: 1. np.where(condition, x, y) 满足条件(condit...

python 画3维轨迹图并进行比较的实例

python 画3维轨迹图并进行比较的实例

一. 数据的格式 首先我们需要x,y,z三个数据进行画图。从本实验用到的数据集KITTI 00.txt中举例: 1.000000e+00 9.043680e-12 2.326809e...