Open F1bos opened 1 week ago
Hi @F1bos Thanks for filing this issue. Can you try adding:
"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"],
to your settings.json and see if that works? Thanks
Hi @F1bos Thanks for filing this issue. Can you try adding:
"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"],
to your settings.json and see if that works? Thanks
Hi.
This is what i have in Python extension logs:
2024-09-18 00:33:41.208 [info] Experiment 'pythonTerminalEnvVarActivation' is inactive
2024-09-18 00:33:41.208 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-09-18 00:33:41.208 [info] Experiment 'pythonTestAdapter' is active
2024-09-18 00:33:41.208 [info] Native locator: Refresh started
2024-09-18 00:33:41.208 [info] Default formatter is set to ms-python.black-formatter for workspace /home/user/projects/some_project
2024-09-18 00:33:42.549 [info] > pyenv which python
2024-09-18 00:33:42.549 [info] cwd: .
2024-09-18 00:33:42.567 [info] Conda environment manager found at: /home/user/miniconda3/bin/conda
2024-09-18 00:33:42.613 [info] Native locator: Refresh finished in 1548 ms
2024-09-18 00:33:42.627 [info] Python interpreter path: ./env/bin/python
2024-09-18 00:33:45.256 [info] Starting Pylance language server.
2024-09-18 00:33:45.268 [info] > ~/miniconda3/bin/conda info --json
2024-09-18 00:34:00.532 [info] Send text to terminal: conda activate env
This is what i got in terminal:
conda activate env
(miniconda3)user@DESKTOP:~/projects/some_project$ conda activate env
EnvironmentNameNotFound: Could not find conda environment: env
You can list all discoverable environments with `conda info --envs`.
Description:
Extension is unable to activate unnamed conda environments created using the
conda create -p
command after the latest update. Previously, these environments were activated correctly. No changes were made to the environments themselves, only VS Code and the Python extension were updated. Named conda environments continue to activate without issue.Steps to reproduce:
Expected behavior:
The Python extension should successfully activate the unnamed conda environment and correctly load its packages, as it did before the update.
Actual behavior:
The Python extension fails to activate the environment and displays an error message, indicating "EnvironmentLocationNotFound". The wrong Python interpreter may be selected, leading to issues with code execution and package resolution.
Logs:
Environment:
Additional information:
conda run
command used by the extension. The logs show it's attempting to activate an environment named "env", but the unnamed environment doesn't have a name and is located at "./env", not "/home/USER/miniconda3/envs/env".I have tried restarting VS Code and reinstalling the Python extension, but the issue persists.
Please investigate this issue and provide a fix to restore the ability to activate unnamed conda environments within the Python extension.