Sublime Forum

Change Python Interpreter with key

#1

I need to change the Python interpreter in sublime text4… It seems cumbersome to do so every time, so can’t I set the key binding as shown below?
If F5 is pressed, set the Python interpreter to usr/bin/python3
set to
If F6 is pressed, can’t you set the python interpreter to /usr/venv/python3?

change python interpreter

0 Likes

#2

in what context though? shebang?

0 Likes

#3

what is shebang mean? I’m not good at English…

0 Likes

#4

Where/how the interpreter is used? Who needs to know this information?

The answer will depend on the above question. There is no “global” standard way to set a python interpreter for everything.

0 Likes

#5

if you have/make two build systems which only differ by which interpreter to use, you could set the active one by creating the appropriate keybindings on the F5 and F6 keys.

1 Like