sublime text 编译时提示[WinError 2] 系统找不到指定的文件。

问题描述:

[WinError 2] 系统找不到指定的文件。

[cmd: ['g++', 'D:\\source-code\\sublime\\test.cpp', '-o', 'D:\\source-code\\sublime/test']]
[dir: D:\source-code\sublime]
[path: D:\program\basic\python3.4.0;C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem]

如下图:


sublime text 编译时提示[WinError 2] 系统找不到指定的文件。_第1张图片


问题分析及解决方案:

1、这个问题是由于没有将GCC的安装目录加入path环境变量,从上图的错误提示path中就可以发现。

2、,所以,将MinGW的安装目录中的bin目录的路径填入PATH环境变量。重启程序,就可以解决了。

sublime text 编译时提示[WinError 2] 系统找不到指定的文件。_第2张图片

你可能感兴趣的:(WinRrror,2,系统找不到指定的文件,sublime,text,+minGW)