Skip to content

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

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

Open
Somiona opened this issue Feb 27, 2025 · 4 comments
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.

@Somiona
Copy link
Author

Somiona commented Mar 17, 2025

Sorry I moved to pyenv as micromamba is having various compatibility issues.. so I guess maybe someone encountering the same issue in the future could test it out.

@BillZhou233
Copy link

I installed micromamba on a mac via homebrew and the extension seems not recognize it at all so I searched the issues and noticed this.

first I attempted to set "python.condaPath": "/opt/homebrew/opt/micromamba/bin/mamba", when I refresh conda env, vscode poped up a message and it got stucked in infinite loading.

Image

Image

module output
2025-04-01 22:56:42.650 [info] Refreshing Conda Environments
2025-04-01 22:56:42.651 [info] Refreshing conda environments
2025-04-01 22:56:42.664 [info] Discovered env: /usr/bin/python3
2025-04-01 22:56:42.666 [error] Unable to find Conda Manager for Conda env (even though we have a conda_dir "/Users/billzhou233/mamba"): Env Details = CondaEnvironment { prefix: "/Users/billzhou233/mamba", executable: None, version: None, conda_dir: Some("/Users/billzhou233/mamba"), arch: None }
2025-04-01 22:56:42.666 [info] Discovered env: /Users/billzhou233/mamba
2025-04-01 22:56:42.668 [error] Unable to find Conda Manager for Conda env (even though we have a conda_dir "/Users/billzhou233/mamba"): Env Details = CondaEnvironment { prefix: "/Users/billzhou233/mamba/envs/try-py312", executable: Some("/Users/billzhou233/mamba/envs/try-py312/bin/python"), version: Some("3.12.9"), conda_dir: Some("/Users/billzhou233/mamba"), arch: None }
2025-04-01 22:56:42.668 [info] Discovered env: /Users/billzhou233/mamba/envs/try-py312/bin/python
2025-04-01 22:56:42.679 [info] Locator Conda took 16.618083ms
2025-04-01 22:56:42.679 [info] Locator Homebrew took 26.327667ms
2025-04-01 22:56:42.679 [info] Locator MacCommandLineTools took 9.67125ms
2025-04-01 22:56:42.679 [info] Locator MacPythonOrg took 22.709µs
2025-04-01 22:56:42.680 [info] Locator MacXCode took 9.75µs
2025-04-01 22:56:42.680 [info] Locator PipEnv took 1.328959ms
2025-04-01 22:56:42.680 [info] Locator Pixi took 780.875µs
2025-04-01 22:56:42.680 [info] Locator Poetry took 1.816542ms
2025-04-01 22:56:42.680 [info] Locator PyEnv took 147.625µs
2025-04-01 22:56:42.680 [info] Locator Venv took 12.292µs
2025-04-01 22:56:42.680 [info] Locator VirtualEnv took 11.208µs
2025-04-01 22:56:42.680 [info] Locator VirtualEnvWrapper took 9.708µs
2025-04-01 22:56:42.680 [info] Locator GlobalVirtualEnvs took 103.375µs
2025-04-01 22:56:42.680 [info] Locator Locators took 26.963917ms
2025-04-01 22:56:42.680 [info] Locator Path took 21.962042ms
2025-04-01 22:56:42.680 [info] Locator Workspaces took 2.084666ms
2025-04-01 22:56:42.680 [info] Using conda from settings: /opt/homebrew/opt/micromamba/bin/mamba
2025-04-01 22:56:42.680 [info] Using conda from settings: /opt/homebrew/opt/micromamba/bin/mamba
2025-04-01 22:56:42.681 [info] Telemetry:  {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":27,"breakdown":{"GlobalVirtualEnvs":0,"Locators":26,"Path":21,"Workspaces":2},"locators":{"Conda":16,"Homebrew":26,"MacCommandLineTools":9,"MacPythonOrg":0,"MacXCode":0,"PipEnv":1,"Pixi":0,"Poetry":1,"PyEnv":0,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0}}}}
2025-04-01 22:56:42.706 [warning] Invalid conda environment: {"displayName":null,"name":"base","executable":null,"kind":"Conda","version":null,"prefix":"/Users/billzhou233/mamba","manager":null,"project":null,"arch":null,"symlinks":null}

also I attempted to create a symlink to a folder in PATH and the issue persists.

Image

module output
2025-04-02 10:12:33.442 [info] Refreshing Conda Environments
2025-04-02 10:12:33.442 [info] Refreshing conda environments
2025-04-02 10:12:33.452 [info] Discovered env: /usr/bin/python3
2025-04-02 10:12:33.452 [error] Unable to find Conda Manager for Conda env (even though we have a conda_dir "/Users/billzhou233/mamba"): Env Details = CondaEnvironment { prefix: "/Users/billzhou233/mamba", executable: None, version: None, conda_dir: Some("/Users/billzhou233/mamba"), arch: None }
2025-04-02 10:12:33.452 [info] Discovered env: /Users/billzhou233/mamba
2025-04-02 10:12:33.453 [error] Unable to find Conda Manager for Conda env (even though we have a conda_dir "/Users/billzhou233/mamba"): Env Details = CondaEnvironment { prefix: "/Users/billzhou233/mamba/envs/try-py312", executable: Some("/Users/billzhou233/mamba/envs/try-py312/bin/python"), version: Some("3.12.9"), conda_dir: Some("/Users/billzhou233/mamba"), arch: None }
2025-04-02 10:12:33.454 [info] Discovered env: /Users/billzhou233/mamba/envs/try-py312/bin/python
2025-04-02 10:12:33.466 [info] Locator Conda took 10.699458ms
2025-04-02 10:12:33.466 [info] Locator Homebrew took 22.17ms
2025-04-02 10:12:33.466 [info] Locator MacCommandLineTools took 7.634209ms
2025-04-02 10:12:33.466 [info] Locator MacPythonOrg took 28.334µs
2025-04-02 10:12:33.466 [info] Locator MacXCode took 130.583µs
2025-04-02 10:12:33.466 [info] Locator PipEnv took 610.291µs
2025-04-02 10:12:33.466 [info] Locator Pixi took 91.375µs
2025-04-02 10:12:33.466 [info] Locator Poetry took 925.709µs
2025-04-02 10:12:33.466 [info] Locator PyEnv took 380.917µs
2025-04-02 10:12:33.466 [info] Locator Venv took 19.125µs
2025-04-02 10:12:33.467 [info] Locator VirtualEnv took 12.625µs
2025-04-02 10:12:33.467 [info] Locator VirtualEnvWrapper took 822.375µs
2025-04-02 10:12:33.467 [info] Locator GlobalVirtualEnvs took 156.5µs
2025-04-02 10:12:33.467 [info] Locator Locators took 22.883916ms
2025-04-02 10:12:33.467 [info] Locator Path took 19.720334ms
2025-04-02 10:12:33.467 [info] Locator Workspaces took 905.25µs
2025-04-02 10:12:33.476 [info] Telemetry:  {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":23,"breakdown":{"GlobalVirtualEnvs":0,"Locators":22,"Path":19,"Workspaces":0},"locators":{"Conda":10,"Homebrew":22,"MacCommandLineTools":7,"MacPythonOrg":0,"MacXCode":0,"PipEnv":0,"Pixi":0,"Poetry":0,"PyEnv":0,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0}}}}
2025-04-02 10:12:33.477 [info] Locator GlobalVirtualEnvs took 250ns
2025-04-02 10:12:33.477 [info] Locator Locators took 459ns
2025-04-02 10:12:33.477 [info] Locator Path took 125ns
2025-04-02 10:12:33.478 [info] Locator Workspaces took 137.333µs
2025-04-02 10:12:33.478 [info] Telemetry:  {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":0,"breakdown":{"GlobalVirtualEnvs":0,"Locators":0,"Path":0,"Workspaces":0},"locators":{}}}}
2025-04-02 10:12:33.489 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.489 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.489 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.489 [error] Unable to find Conda Manager for Conda env (even though we have a conda_dir "/Users/billzhou233/mamba"): Env Details = CondaEnvironment { prefix: "/Users/billzhou233/mamba", executable: None, version: None, conda_dir: Some("/Users/billzhou233/mamba"), arch: None }
2025-04-02 10:12:33.490 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.493 [info] Discovered env: /Users/billzhou233/mamba
2025-04-02 10:12:33.495 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.495 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.496 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.496 [error] Unable to find Conda Manager for Conda env (even though we have a conda_dir "/Users/billzhou233/mamba"): Env Details = CondaEnvironment { prefix: "/Users/billzhou233/mamba/envs/try-py312", executable: Some("/Users/billzhou233/mamba/envs/try-py312/bin/python"), version: Some("3.12.9"), conda_dir: Some("/Users/billzhou233/mamba"), arch: None }
2025-04-02 10:12:33.496 [info] Discovered env: /Users/billzhou233/mamba/envs/try-py312/bin/python
2025-04-02 10:12:33.497 [info] Discovered env: /usr/bin/python3
2025-04-02 10:12:33.499 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.499 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.500 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.501 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.502 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.502 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.503 [info] Resolved Python Environment /usr/bin/python3
2025-04-02 10:12:33.503 [info] Locator Conda took 10.028291ms
2025-04-02 10:12:33.503 [info] Locator Homebrew took 21.611459ms
2025-04-02 10:12:33.503 [info] Locator MacCommandLineTools took 10.148ms
2025-04-02 10:12:33.503 [info] Locator MacPythonOrg took 13.459µs
2025-04-02 10:12:33.503 [info] Locator MacXCode took 7.167µs
2025-04-02 10:12:33.503 [info] Locator PipEnv took 6.458µs
2025-04-02 10:12:33.503 [info] Locator Pixi took 7.958µs
2025-04-02 10:12:33.503 [info] Locator Poetry took 112.375µs
2025-04-02 10:12:33.503 [info] Locator PyEnv took 64.667µs
2025-04-02 10:12:33.503 [info] Locator Venv took 6.5µs
2025-04-02 10:12:33.503 [info] Locator VirtualEnv took 6.041µs
2025-04-02 10:12:33.503 [info] Locator VirtualEnvWrapper took 7.917µs
2025-04-02 10:12:33.503 [info] Locator GlobalVirtualEnvs took 37.375µs
2025-04-02 10:12:33.504 [info] Locator Locators took 22.082292ms
2025-04-02 10:12:33.504 [info] Locator Path took 23.52425ms
2025-04-02 10:12:33.504 [info] Locator Workspaces took 652.625µs
2025-04-02 10:12:33.504 [info] Using conda from cache: /Users/billzhou233/mamba/condabin/conda
2025-04-02 10:12:33.504 [info] Using conda from cache: /Users/billzhou233/mamba/condabin/conda
2025-04-02 10:12:33.505 [info] Telemetry:  {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":23,"breakdown":{"GlobalVirtualEnvs":0,"Locators":22,"Path":23,"Workspaces":0},"locators":{"Conda":10,"Homebrew":21,"MacCommandLineTools":10,"MacPythonOrg":0,"MacXCode":0,"PipEnv":0,"Pixi":0,"Poetry":0,"PyEnv":0,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0}}}}
2025-04-02 10:12:33.531 [warning] Invalid conda environment: {"displayName":null,"name":"base","executable":null,"kind":"Conda","version":null,"prefix":"/Users/billzhou233/mamba","manager":null,"project":null,"arch":null,"symlinks":null}
2025-04-02 10:12:36.388 [info] Refreshing Conda Environments
2025-04-02 10:12:36.388 [info] Refreshing conda environments
2025-04-02 10:12:36.398 [info] Discovered env: /usr/bin/python3
2025-04-02 10:12:36.399 [error] Unable to find Conda Manager for Conda env (even though we have a conda_dir "/Users/billzhou233/mamba"): Env Details = CondaEnvironment { prefix: "/Users/billzhou233/mamba", executable: None, version: None, conda_dir: Some("/Users/billzhou233/mamba"), arch: None }
2025-04-02 10:12:36.400 [info] Discovered env: /Users/billzhou233/mamba
2025-04-02 10:12:36.401 [error] Unable to find Conda Manager for Conda env (even though we have a conda_dir "/Users/billzhou233/mamba"): Env Details = CondaEnvironment { prefix: "/Users/billzhou233/mamba/envs/try-py312", executable: Some("/Users/billzhou233/mamba/envs/try-py312/bin/python"), version: Some("3.12.9"), conda_dir: Some("/Users/billzhou233/mamba"), arch: None }
2025-04-02 10:12:36.401 [info] Discovered env: /Users/billzhou233/mamba/envs/try-py312/bin/python
2025-04-02 10:12:36.413 [info] Locator Conda took 12.600959ms
2025-04-02 10:12:36.413 [info] Locator Homebrew took 23.622666ms
2025-04-02 10:12:36.413 [info] Locator MacCommandLineTools took 5.982292ms
2025-04-02 10:12:36.413 [info] Locator MacPythonOrg took 17.875µs
2025-04-02 10:12:36.413 [info] Locator MacXCode took 11µs
2025-04-02 10:12:36.413 [info] Locator PipEnv took 12.916µs
2025-04-02 10:12:36.413 [info] Locator Pixi took 18.875µs
2025-04-02 10:12:36.413 [info] Locator Poetry took 700.25µs
2025-04-02 10:12:36.413 [info] Locator PyEnv took 194.416µs
2025-04-02 10:12:36.413 [info] Locator Venv took 125.75µs
2025-04-02 10:12:36.413 [info] Locator VirtualEnv took 156.708µs
2025-04-02 10:12:36.414 [info] Locator VirtualEnvWrapper took 312.5µs
2025-04-02 10:12:36.414 [info] Locator GlobalVirtualEnvs took 103.375µs
2025-04-02 10:12:36.414 [info] Locator Locators took 23.956541ms
2025-04-02 10:12:36.414 [info] Locator Path took 20.568625ms
2025-04-02 10:12:36.414 [info] Locator Workspaces took 684.5µs
2025-04-02 10:12:36.414 [info] Using conda from cache: /Users/billzhou233/mamba/condabin/conda
2025-04-02 10:12:36.414 [info] Using conda from cache: /Users/billzhou233/mamba/condabin/conda
2025-04-02 10:12:36.415 [info] Telemetry:  {"event":"RefreshPerformance","data":{"refreshPerformance":{"total":24,"breakdown":{"GlobalVirtualEnvs":0,"Locators":23,"Path":20,"Workspaces":0},"locators":{"Conda":12,"Homebrew":23,"MacCommandLineTools":5,"MacPythonOrg":0,"MacXCode":0,"PipEnv":0,"Pixi":0,"Poetry":0,"PyEnv":0,"Venv":0,"VirtualEnv":0,"VirtualEnvWrapper":0}}}}
2025-04-02 10:12:36.443 [warning] Invalid conda environment: {"displayName":null,"name":"base","executable":null,"kind":"Conda","version":null,"prefix":"/Users/billzhou233/mamba","manager":null,"project":null,"arch":null,"symlinks":null}

@karthiknadig
Copy link
Member

Conda support here is minimal right now. I will expand it soon.

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

3 participants