Search code examples
sublimetext3build-system

sublime text 2 build system: error 5 access is denied


I used this as my python3.6 build system in Sublime Text 2:

{

"cmd": ["C:\\Users\\lol--\\AppData\\Local\\Programs\\Python\\Python36", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"

}

When I try to build I get the Error: [WinError 5] access is denied

My Python3.6 exe is definitely in that directory!

What could be the problem and a solution?


Solution

  • As noted in this forum post on the Sublime Text forum, the problem is that you didn't specify as the first part of cmd the name of the python executable, you specified where it's stored. The first argument in cmd is the program to run, so you've told Sublime to run the directory and Windows is saying "No, you can't do that".

    The error you get is different if you use shell_cmd instead and makes the problem you're having clearer. In either case the solution to the problem is to make sure that the first item is the name of the Python binary.