Using macOS.
I'm using VSCode 1.28.2 and I am wondering how I can force VSCode to use Python 3 instead of Python 2. Unless I use the shebang: #!/usr/bin/env python3
, I always get an ImportError or some other problem, even though the intrepreter is using Python 3.7.
Image here:
If I use the shebang, the code works and the output in the Terminal is:
<bound method Response.raise_for_status of <Response [200]>>
I am using the Python Extension by Microsoft.(https://marketplace.visualstudio.com/items?itemName=ms-python.python)
Any advice would be appreciated.
Check issue 2125 which mentions:
That same issue includes the following workaround:
That could help set a default python version.