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

After using whl2conda install cannot install other packages using conda with libmamba solver #114

Closed
analog-cbarber opened this issue Jan 6, 2024 · 1 comment
Assignees
Labels
component: install defect Something isn't working

Comments

@analog-cbarber
Copy link
Collaborator

Due to a bug in conda, once you install a package into
an environment from a conda file, attempts to install additional packages using the default libmamba solver
will result in an InvalidMatchSpec error, e.g.

$ conda install -n foobar pytest
Channels:
 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: failed

InvalidMatchSpec: Invalid spec 'tomlkit[url=file:///Users/Christopher.Barber/miniconda3/pkgs/tomlkit-0.12.3-py_0.conda]': Libmamba only supports a subset of the MatchSpec interface for now. You can only use ('name', 'version', 'build', 'channel', 'subdir'), but you tried to use ('url',).

This does not appear to be a problem if you are using mamba or the classic solver. If you are using conda and not mamba,
you can either explicitly request the classic solver using --solver classic or you can make that the default for that environment
by activating the environment and running:

conda config --env --set solver classic

We should probably have whl2conda install do the latter automatically.

@analog-cbarber
Copy link
Collaborator Author

The original conda bug moved to conda/conda-libmamba-solver#418

It looks like it is getting fixed soon...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: install defect Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant