-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Conda/Miniforge environments not detected as Jupyter kernels in VSCode (2025.x extension versions)
Environment Data
- VS Code Version: 1.105.1
- OS Version: macOS (Darwin arm64)
- Python Extension Version: 2025.17.2025101701 (broken), rolled back to 2024.16.0 (working)
- Jupyter Extension Version: 2025.9.1 (broken), rolled back to 2024.9.1 (working)
- Python Environment Manager Extension Version: 1.11.13001538
- Python Distribution: Miniforge3
- Python Version: 3.x (multiple environments)
Expected Behavior
When opening a Jupyter notebook in VSCode and selecting a kernel, all conda environments with ipykernel installed should appear in the kernel selection menu, as they did in previous versions of the extensions.
Actual Behavior
With Python extension v2025.x and Jupyter extension v2025.x, conda environments are not detected as available kernels. Only system Python interpreters appear in the kernel selection menu, despite having multiple conda environments properly configured with ipykernel installed.
Error Logs
The Jupyter output panel shows the following errors:
20:23:57.148 [warn] No interpreter with path ~/miniforge3/bin/python found in Python API, will convert Uri path to string as Id ~/miniforge3/bin/python
20:23:57.149 [warn] No interpreter with path ~/miniforge3/envs/ncil/bin/python found in Python API, will convert Uri path to string as Id ~/miniforge3/envs/ncil/bin/python
20:24:00.398 [warn] Failed to get Python interpreter details from Python Extension API for ~/miniforge3/envs/ncil/bin/python Error: Failed to run "conda info --envs --json":
/bin/sh: ~/miniforge3/bin: is a directory
20:24:00.400 [warn] Kernel Spec for 'Python (ncil)' (~/Library/Jupyter/kernels/ncil/kernel.json) hidden, as we cannot find a matching interpreter argv = '~/miniforge3/envs/ncil/bin/python'. To resolve this, please change '~/miniforge3/envs/ncil/bin/python' to point to the fully qualified Python executable.
Steps to Reproduce
- Install Miniforge3 on macOS (ARM64)
- Create conda environments with
ipykernelinstalled:conda create -n test_env python=3.10 conda activate test_env conda install ipykernel
- Register the kernel (though this shouldn't be necessary with
nb_conda_kernels):python -m ipykernel install --user --name test_env --display-name "Python (test_env)" - Open VSCode with latest Python (2025.x) and Jupyter (2025.x) extensions
- Open a Jupyter notebook
- Attempt to select kernel - conda environments will not appear
Attempted Solutions That Failed
-
Updated settings.json with full paths (no tildes):
{ "python.condaPath": "/Users/username/miniforge3/bin/conda", "python.defaultInterpreterPath": "/Users/username/miniforge3/bin/python", "jupyter.kernels.trusted": ["/Users/username/miniforge3/envs/*/bin/python"] } -
Manually registered kernels using
ipykernel installwith full paths -
Verified kernel.json files contain full paths without tildes:
{ "argv": [ "/Users/username/miniforge3/envs/ncil/bin/python", "-m", "ipykernel_launcher", "-f", "{connection_file}" ] } -
Installed
nb_conda_kernelsin base environment (should auto-detect all conda envs) -
Cleared all VSCode caches:
rm -rf ~/Library/Application\ Support/Code/User/workspaceStorage/ rm -rf ~/Library/Application\ Support/Code/User/globalStorage/ms-python.python/ rm -rf ~/Library/Application\ Support/Code/User/globalStorage/ms-toolsai.jupyter/
Root Cause Analysis
The issue appears to be related to tilde (~) path expansion. Despite having full paths in all configuration files, the VSCode extensions internally attempt to use paths with tildes (as seen in the error logs), which fail to resolve properly. The error message shows the extension is looking for ~/miniforge3/bin/python instead of /Users/username/miniforge3/bin/python.
The extensions seem to be caching these tilde paths internally and not properly expanding them, even when all user-facing configuration uses full absolute paths.
Solution/Workaround
Rolling back to earlier versions resolves the issue completely:
- Rollback Jupyter extension to v2024.9.1
- Rollback Python extension to v2024.16.0
- Reload VSCode
After rollback, all conda environments immediately appear in the kernel selection menu without any additional configuration needed.
Impact
This bug severely impacts data science workflows for users who:
- Use conda/mamba/miniforge for environment management
- Work with Jupyter notebooks in VSCode
- Have upgraded to the latest extension versions
This is a regression from previous versions where conda environment detection worked automatically and reliably.
Suggested Fix
- Fix tilde path expansion in the interpreter detection logic
- Ensure the extensions properly expand
~to the user's home directory before attempting to access files - Add test coverage for conda environments with paths containing tildes
- Consider reverting whatever change was made between v2024.16.0 (Python) / v2024.9.1 (Jupyter) and the 2025.x versions that broke this functionality
Related Issues
This may be related to other reported issues with interpreter detection on macOS, particularly for conda/miniforge installations.
Additional Context
- The issue affects Miniforge3 installations on macOS ARM64 (Apple Silicon)
nb_conda_kernelspackage is installed but not being recognized by the 2025.x extensions- The same setup works perfectly with the September/October 2024 versions of the extensions
- This appears to be a regression introduced in the 2025.x versions
Reproducibility
This issue is 100% reproducible on the affected setup and is immediately resolved by rolling back to the specified earlier versions.