venv not being recognised when auto activated in terminal upon opening despite positive confirmation message received. #24831
Labels
info-needed
Issue requires more information from poster
triage-needed
Needs assignment to the proper sub-team
User for around 2 years - recent issue. I create a venv each time I begin a new project, install my dependencies and begin to work. Recently, when I create a new project, create my venv and open the terminal I get the confirmation message that the venv has been activated (despite it not displaying 'venv' as per the conf message) however, when I try to install my dependencies it puts them in the global installation. Fine, I then tried to manually activate the venv and install the packages (this works) and close the terminal and re-open to again depend on the auto activation venv feature to try and run my code, it's not able to find the dependencies as again, it's just relying on the global installation it seems. Despite it telling me that it has successfully activated the venv.
I have tried every troubleshooting tip I could find from closing and re-opening the terminal session, the entire vscode session, manually pointing to the python.exe in the venv via command palette, making sure the setting for auto activation is checked in the settings, ensuring that the selection menu in the bottom right hand corner is pointing to the correct venv, uninstalling all extensions including Python and reinstalling one by one and retrying.
I am able to manually activate the venv via the conventional method and it does work, so it leads me to believe the issue is not with venv itself but VSCode and the auto activation feature.
If you need any further info please let me know
VS Code Version: Version: 1.97.2 (user setup)
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS Version: Windows_NT x64 10.0.19045
The text was updated successfully, but these errors were encountered: