You should be able to point VSCode to a specific python interpreter in a virtual environment - you can access this via View > Command Palette > Python: Select Interpreter

Then once you open a .py file you should see the python interpreter in the bottom right portion of the window, and if you open a new terminal it will use that specified interpreter
Some other references:
- How do I set standard Interpreter path for python in vscode config json?
- Visual Studio code is not loading my python interpreters
- https://code.visualstudio.com/docs/python/environments
You should be able to point VSCode to a specific python interpreter in a virtual environment - you can access this via View > Command Palette > Python: Select Interpreter

Then once you open a .py file you should see the python interpreter in the bottom right portion of the window, and if you open a new terminal it will use that specified interpreter
Some other references:
- How do I set standard Interpreter path for python in vscode config json?
- Visual Studio code is not loading my python interpreters
- https://code.visualstudio.com/docs/python/environments
To select a specific Python interpreter with ArcGIS Pro 3.0 within a virtual environment in Visual Studio Code (VSCode), you can follow these steps:
create a virtual environment. ArcGIS Pro 3.0 comes with its own Python installation, you need to ensure that the virtual environment is set up correctly to use that Python version.
python -m venv myenvActivate the virtual environment. on windows:
myenv\Scripts\activateon macos :myenv/bin/activatePress Ctrl + Shift + P (or Cmd + Shift + P on macOS) to open the Command Palette.
Type Python select interpreter and press Enter.
In the list of available interpreters, you should see the Python interpreter from your virtual environment. It might be named something like "myenv".
Select the desired Python interpreter from the list
now you will get your desired interpreter.
Need to select Python interpreter in VS code
Making MCP cheaper via CLI
Issue with the interpreter in Visual Studio Code
Selecting Python interpreter fails if using Finder (macOS)
Videos
Happy New Year Everyone :)
I have zero coding experience and want to learn Python in VSC following Dave Gray on YT, but I can't even configure it for use. Here's what I've done:
Install VSC
Install Python
Install Python Extension
In VSC configure interpreter as Python
It's just stuck on 'powershell' all the time. I start new terminal - it's powershell. I save and open my test .py file and it's still on powershell, I don;t even see any option to select Python interpreter anywhere.
I've read all posts I could find here on the same topic and I've followed all advices incl. adding Python to Windows PATH, adding interpreter into config .json, ticking various boxes in Python extension settings etc. and nothing seems to be working.
I want to use VSC because that's what the YT tutorial is using, but I'll have to switch to something else if it refuses to work any longer.
Can anyone help please?
Thanks a million!
» pip install torch