I am a complete beginner at using python and sublime.
What could this error message mean? I believe I have python3 installed already.
I am a complete beginner at using python and sublime.
The diagnostic output shows you the command that was executed:
[cmd: ['/usr/local/bin/python3', '-u', '%file']]
When you created your custom build system, you use %file
instead of $file
as the variable that expands out to the name of the current file. As a result it’s not a build variable and doesn’t expand, so Python always thinks that you’re trying to execute the same file (%file
).
Editing the build to fix that should resolve the problem.
Alternatively, depending on where you got the information for how to create your own build, for the best out of box experience you might want to instead:
View Package File
from the command palette to open Python/Python.sublime-build
python3
instead of Python (you don’t need to specify the /usr/local/bin
because that’s already in your PATH, as seen in the diagnostic output)That will make sure that your custom build does what the internal build would do but using the other Python version. Among other things that also ensures that errors in your code are detected properly so that you can navigate to them and see them inline, which is something that not all instructions for how to do something like this cover.