Brian McGill
Brian McGill

Reputation: 11

VS Code does not use python interpreter set in command pallete or virtual environment

I am trying to use the VS Code editor to run a Qt python project. When I click the play button it uses the homebrew interpreter rather than the one in the virtual environment set in the terminal.

I tried changing the interpreter to the one in the venv by using the command palette. This works for all other python projects i have created. But for some reason it doesn’t work with this qt project. It works if I type python <file.py> in the terminal, but then I won’t be able to use the debugger. I could use the Qt IDE debugger, but I am used to VS Code, and I like to ask questions to GitHub CoPilot

I also put the venv python path in a launch.json and settings.json file in the same directory of the main.py file as suggested by GitHub CoPilot

Upvotes: 0

Views: 28

Answers (0)

Related Questions