This error is indicative of your not having saved your Python script file before you tried to run the build. In particular notice that in your posted output, you see the shell_cmd
that was executed as:
[shell_cmd: python -u ""]
That is, it's trying to execute python
with an empty file name. For example, compare that to the contents of your sublime-build
file, which
probably looks something like:
"shell_cmd": "python -u "$file"",
If the file is not saved, the file has no name, and as a result, the Python interpreter complains about the same thing:
/usr/bin/python: can't find '__main__' module in ''
The module name is an empty string (''
), which should be the name of the file that you're trying to execute.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…