In VSCode you can open the Command Palette with Ctrl+Shift+P
and the search for Python: Select Interpreter
. There you can select the Python version you want to use and from then on, the scripts you execute from VSCode will use that version by default.