-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtual environments not found #24788
Comments
@mgeorge-is Is your locator native or js? ![]() |
@anthonykim1: js (edit: this setting is for version ![]() |
I'm also experiencing problems with the python.locator setting. When set to native PET.EXE ist blocked from execution by AppLocker. There is an entry in the log files, but no indication in the GIU. I my case, no python runtimes could be found. Not even the runtime installed by VS Code itself. VS Code is a system installation, but PET.EXE is in my user profile where the python extension lives. |
@mgeorge-is Does it work if you select it by navigating to it? @lvm-1896 You may need to add either Microsoft Publisher or the specific |
Ran into this issue too on a brand new install of VSCode and vscode-python extension. What helped was switching locator off of native to js (and I restarted VSCode for good measure too). |
@karthiknadig: yes, I can select an environment that is not detected via |
Thanks, I will investigate. For now please use the workaround. |
I switched back to JS and the user can work again now. I'll try to get the AppLocker exception deployed for the userbase in my enterprise (~ 600 installations). AFAICS PET.EXE ist the first executable installed outside the installation directory (VS Code system installation), so the requirement for further exceptions was a bit suprising for me and it took quite a while to find the reason for failing python support. Maybe ist is possible to bring up a user visible message in case the locator fails? Or even better provide an automatic fallback with a warning? Failure to detect python on all workstations would have been a nightmare for me ... |
I'm on VS Code version 1.97.2 on arm64 macOS and was frustrated having experienced this issue. Fortunately the switch to the old js locator worked. |
@mgeorge-is : I tried to follow your suggestion to setup an AppLocker exception for pet.exe. Because pet.exe is missing a product info, I'm having trouble to convince my admistrators to add an exception for all Microsoft-signed executables. |
@lvm-1896, I opened the original issue (environment locators not working). I am not a VS Code developer. I suggest you open a new issue for your problem to prevent confusion. |
Type: Bug
Behaviour
Hatch virtual environments are not displayed when using the command palette
Python: Select Interpreter
(or similarly when using the Jupyter extensionsSelect Kernel
option).Steps to reproduce:
2024.18.0
or later.hatch env create
, create multiple virtual environments. By default they are placed in the.hatch
directory of the workspace root.Python: Select Interpreter
(or Jupyter extensionSelect Kernel
) and local environments will not be listed.2024.16.1
and restart and the environments are displayed as expected.Diagnostic data
The issue is reproducible in all versions
2024.18.0
and higher. Possibly related to this commit which fixed an unrelated duplication issue: #243212024.16.1
2024.18.0
Extension version:
2024.18.0
VS Code version: Code 1.96.4 (Universal) (cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba, 2025-01-16T00:16:19.038Z)
OS version: Darwin arm64 24.3.0
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
The text was updated successfully, but these errors were encountered: