How to set Python3 as default interpreter for VS Code | or set any version as default interpreter.
Want to run your python code with a particular python version in Microsoft VS Code? And, make it the default version? Read on. Make sure that the required version is installed. You check the available version and the path by running this command. I am trying this on Apple Mac. It should be similar in Windows Machines as well. Open the VS Code, at the bottom of the screen you will Terminal. If it is not visible, Go to View and then select Terminal. Check the available python versions and their path. % which python /usr/bin/python % which python2 /usr/bin/python2 % which python3 /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 Next, Run this python code to check what version is used by default. import platform print ( platform . python_version_tuple ()) print ( type ( platform . python_version_tuple ())) You will get this ('2', '7', '16') <type 'tuple'> Now you know the path and versions available. In the VS code...