Skip to content
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

Demo conda resolver does not recognize minimanba installation on MacOS #203

Open
Somiona opened this issue Feb 27, 2025 · 1 comment
Open

Comments

@Somiona
Copy link

Somiona commented Feb 27, 2025

As described in the title, I am using minimanba on MacOS and I have made an alias from mamba to conda in my .zprofile.

This is the Python Environment Output I got.

I know the conda resolver is just a demo as mentioned in the #79, however I wish this issue can provide an remedy to the people encountered the same issue.

2025-02-26 22:56:42.809 [info] Telemetry:  {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":0,"breakdown":{"GlobalVirtualEnvs":0,"Locators":0,"Path":0,"Workspaces":0},"locators":{}}}}
2025-02-26 22:56:42.820 [info] Resolved Python Environment /opt/homebrew/bin/python3
2025-02-26 22:56:42.824 [info] Resolved Python Environment /opt/homebrew/bin/python3
2025-02-26 22:56:42.829 [info] Discovered manager: (Poetry) /Users/somiona/.local/pipx/venvs/poetry/bin/poetry
2025-02-26 22:56:42.844 [info] Discovered env: /usr/bin/python3
2025-02-26 22:56:42.844 [info] Resolved Python Environment /opt/homebrew/bin/python3
2025-02-26 22:56:42.845 [error] Unable to find Conda Manager for env (even though we have a conda_dir): CondaEnvironment { prefix: "/Users/somiona/micromamba", executable: Some("/Users/somiona/micromamba/bin/python"), version: Some("3.12.9"), conda_dir: Some("/Users/somiona/micromamba"), arch: None }
2025-02-26 22:56:42.845 [info] Discovered env: /opt/homebrew/bin/python3
2025-02-26 22:56:42.846 [info] Resolved Python Environment /opt/homebrew/bin/python3
2025-02-26 22:56:42.908 [info] Discovered env: /Users/somiona/micromamba/bin/python
2025-02-26 22:56:42.914 [info] Resolved Python Environment /opt/homebrew/bin/python3
2025-02-26 22:56:42.922 [info] Resolved Python Environment /opt/homebrew/bin/python3
2025-02-26 22:56:42.924 [info] Resolved /opt/homebrew/bin/python3
2025-02-26 22:56:42.925 [info] Locator Conda took 34.054334ms
2025-02-26 22:56:42.925 [info] Locator Homebrew took 104.405167ms
2025-02-26 22:56:42.926 [info] Locator MacCommandLineTools took 5.976917ms
2025-02-26 22:56:42.926 [info] Locator MacPythonOrg took 27µs
2025-02-26 22:56:42.926 [info] Locator MacXCode took 15.708µs
2025-02-26 22:56:42.926 [info] Locator PipEnv took 34.208µs
2025-02-26 22:56:42.926 [info] Locator Pixi took 2.312916ms
2025-02-26 22:56:42.926 [info] Locator Poetry took 187.417µs
2025-02-26 22:56:42.926 [info] Locator PyEnv took 2.4945ms
2025-02-26 22:56:42.926 [info] Locator Venv took 5.958µs
2025-02-26 22:56:42.926 [info] Locator VirtualEnv took 7.375µs
2025-02-26 22:56:42.926 [info] Locator VirtualEnvWrapper took 9.209µs
2025-02-26 22:56:42.926 [info] Locator GlobalVirtualEnvs took 48.333µs
2025-02-26 22:56:42.926 [info] Locator Locators took 105.351917ms
2025-02-26 22:56:42.926 [info] Locator Path took 36.171416ms
2025-02-26 22:56:42.927 [info] Locator Workspaces took 2.986125ms
2025-02-26 22:56:42.929 [info] Conda not found, turning off conda features. Error: Conda not found
    at x (/Users/somiona/.vscode/extensions/ms-python.vscode-python-envs-0.3.10441011-darwin-arm64/dist/extension.js:2:434282)
    at t.registerCondaFeatures (/Users/somiona/.vscode/extensions/ms-python.vscode-python-envs-0.3.10441011-darwin-arm64/dist/extension.js:2:445283)
    at async Promise.all (index 1)
    at Immediate.<anonymous> (/Users/somiona/.vscode/extensions/ms-python.vscode-python-envs-0.3.10441011-darwin-arm64/dist/extension.js:2:518166)
2025-02-26 22:56:42.930 [info] Telemetry:  {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":105,"breakdown":{"GlobalVirtualEnvs":0,"Locators":105,"Path":36,"Workspaces":2},"locators":{"Conda":34,"Homebrew":104,"MacCommandLineTools":5,"MacPythonOrg":0,"MacXCode":0,"PipEnv":0,"Pixi":2,"Poetry":0,"PyEnv":2,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0}}}}

For people come after me, one temporary solution is just uninstall this plugin, then your VSCode should detect the mamba environment correctly.

@karthiknadig
Copy link
Member

@Somiona Instead of an alias can you create a symlink named conda, and ensure that it is on PATH. See of that helps?

another option to try is setting python.condaPath, and see if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants