Sublime Forum

About Sublime Text 4113


When I open Sublime Text 4113, build a .py file which created by Sublime Text 3211, it said “Unable to create process…”.
I checked the file, it is no problem in 3211 and IDLE.
I checked the file again, found the first line of the file is like this: “#!/usr/bin/env.python3”.
I inserted a space between “#” and “!”, and tried it, the file became buildable.
I inserted a space before “#”, and tried it again, the file became buildable too.

I wonder why?



What are you doing to make that error show up? Are you using a build system?



I’m learning Python. I guess the error is caused by “#!” at the beginning.
“# !” is ok, or " #!".



But built by Sublime Text 3211, it is no problem too.



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.