I have .py script open in sublime text that I would like to run using ctrl+B.
The script to test is simply printing the python version and location:
import sys
print("Current Python version", sys.version)
print("Current Python folder:", sys.prefix)
Automatically Sublime Text selects the "Python" build system, which is good. To make sure I selected it manually:
However that build system doesn't refer to the right Python exe. because the result of this is
Can't find a default Python. [Finished in 62ms]
I verified that Python is well installed and available in the cmd.
I can run those same commands and I get:
Current Python folder: C:\Users\mat\scoop\apps\python\current
Note that the script worked previously and printed v 3.9.x which was in a separate folder, but was uninstalled recently.
So my question is:
How can I change the default Python build system to use either a specific folder or the default python path.
(I already tried to restart sublime-text & windows, with no success)


For Windows OS:
C:\Users\trira>py --list
Installed Pythons found by py Launcher for Windows
-3.10-64 *
-3.8-64
)
{ "shell_cmd": "start cmd /k py -3.10-64 $file_name" }
(Optional step) Give the build a meaningful name containing version info.
Now select & use this build to run your python script.