Are you on Linux? The shebang
line #!/usr/bin/env.python3
that you posted above isn’t valid.
Everything from the end of #!
to the first space in the line is the name of the program to execute, and there’s a .
in there where there should be a space.
So the line is telling it to execute /usr/bin/env.python3
which is not an actual program, and you end up with an error like not being able to run it. /usr/bin/env python3
on the other hand tells the /usr/bin/env
program to find and run python3
, which would work.
Similarly, breaking the shebang so that the first two characters aren’t #!
(such as by adding a space) disables it entirely.
The real question is why you’re seeing that, because generally speaking the build system you’re using should be executing Python directly and not trying to do something with the python script itself, so I would imagine you shouldn’t be seeing this.
Did you set up some sort of custom build system of some sort? The internet is rife with examples of “must use” build systems for Python, but most of them are outdated or flawed in one way or another. The one that ships with Sublime should work for 99% of people out of the box and should be used as the basis for any changes in the unlikely event that you need to modify anything.