[Python] Python in vscode - Setting terminal.integrated.defaultProfile.windows disables my...

Discussão em 'Python' iniciado por Stack, Abril 13, 2025.

  1. Stack

    Stack Membro Participativo

    I have a .venv with several python modules installed that have been working without issues. After making some changes to settings.json I began getting ModuleNotFoundError. After much trial and error I narrowed it down to terminal.integrated.defaultProfile.windows. If I set this (e.g. to "git bash" but not sure if the value matters), and restart vscode, it correctly sets git bash as my default shell but my .venv modules stop working. "pip list" now displays globally installed modules only, and "which python" displays the global python executable, not the one in my venv. However the vscode interface still shows that I have activated my .venv with the correct path to the one in my project folder, so this seems to be terminal specific. Commenting out the pref brings everything back and .venv/my modules work as expected.

    I'd like to set git bash as my default terminal as well as keep my .venv. Is there something I can set to allow both?

    Continue reading...

Compartilhe esta Página