Sublime Forum

WinError 2

#1

Howdy all,

New to sublime text, received the following error when trying to run Lua in Sublime. Anyone know what the issue may be?

[WinError 2] The system cannot find the file specified
[cmd: ['lua', 'C:\\Users\\Jack\\Documents\\LuaProjects\\main.lua']]
[dir: C:\Users\Jack\Documents\LuaProjects]
[path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\MATLAB\R2018b\bin;C:\Users\Jack\Documents\lua;C:\Users\Jack\AppData\Local\Programs\Python\Python37-32]
[Finished]

I am able to run the file in the Command Prompt via the following:

lua53 C:\Users\Jack\Documents\LuaProjects\main.lua

0 Likes

#2

Obviously

[cmd: ['lua', 'C:\\Users\\Jack\\Documents\\LuaProjects\\main.lua']]

is different from

lua53 C:\Users\Jack\Documents\LuaProjects\main.lua
0 Likes

#3

Where would I fix that?

I have a file named lua.sublime-build that has the following:

{
“cmd”: [“lua53”, “$file”],
“file_regex”: “^lua: (…?):([0-9]):?([0-9]*)”,
“selector”: “source.lua”
}

It’s still running the lua command instead of the lua53 command.

0 Likes

#4

if you want to overwrite built-in build system, you have to keep the same directory structure and filename as it is in the built-in package. That is Packages/Lua/Lua.sublime-build.

if you want to use a new build system but not overwriting, ctrl+shift+b to select which one to be used.

another solution can be that if lua53 is the only lua on your machine, soft-link it to lua.

1 Like

#5

Got it working. Thank you!

0 Likes