randy3k / Terminus

Bring a real terminal to Sublime Text

Home Page:https://packagecontrol.io/packages/Terminus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terminus Build System not working for Python since Python v3.11

zxyzgt opened this issue · comments

I use the following setting to build system for Python in Sublime. It worked perfectly until Python 3.11. I tested the same settings for Python v3.8, 3.9 and 3.10.9. They are all working. Since v3.11.1 (and the latest v3.12), it gives an error:
"Unable to create process using '"C:\Users\xxx\AppData\Local\Programs\Python\Python311\ -3" -u "c:\My Drive\abc.py"': The system cannot find the file specified."
Dir Python\Python311 has already been added to the system path. Looks like terminus can't find py.exe under the system path.
Sublime is build4152.

The same settings for all versions of the build system:

{
   "target": "terminus_exec",
    "cancel": "terminus_cancel_build",
    "working_dir": "$file_path",

    "cmd": ["py", "-3", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python",
    "env": {"PYTHONIOENCODING": "utf-8"},
    "windows": {
        "cmd": ["py", "-3", "-u", "$file"],
    }
}

After I commented the first 3 lines for terminus settings, the default build system works for Python 3.11 and 3.12.
Please help!