You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My problem is not solved in the Troubleshooting docs
Anaconda default channels
I do NOT use the Anaconda default channels (pkgs/* etc.)
How did you install Mamba?
Mambaforge or latest Miniforge
Search tried in issue tracker
Found invalid version predicate in
Latest version of Mamba
My problem is not solved with the latest version
Tried in Conda?
Not applicable
Describe your issue
If a conflict involves a pinned package (e.g. python) and flags.allow_uninstall=False, unsolvable.explain_problems() fails with libmambapy.bindings.specs.ParseError: Found invalid version predicate in "on python".
Reproducer with Python
importlibmambapydb=libmambapy.solver.libsolv.Database(
libmambapy.specs.ChannelResolveParams(
channel_alias=libmambapy.specs.CondaURL.parse("https://conda.anaconda.org")
)
)
print("loading repodata")
repos= [
db.add_repo_from_repodata_json(
path="/opt/conda/pkgs/cache/d9d93fba.json", # taken from the pkgs/cacheurl="https://conda.anaconda.org/conda-forge/linux-aarch64",
channel_id="conda-forge",
),
db.add_repo_from_repodata_json(
path="/opt/conda/pkgs/cache/09cdf8bf.json", # taken from the pkgs/cacheurl="https://conda.anaconda.org/conda-forge/noarch",
channel_id="conda-forge",
),
]
Request=libmambapy.solver.RequestMatchSpec=libmambapy.specs.MatchSpecprint("crafting request...")
request=Request(
jobs=[
Request.Pin(MatchSpec.parse("python=3.12")),
Request.Install(MatchSpec.parse("numpy=*=*py27*")),
],
flags=Request.Flags(
allow_downgrade=True,
allow_uninstall=False,
force_reinstall=False,
keep_dependencies=True,
keep_user_specs=True,
order_request=False, # we do this ourselvesstrict_repo_priority=True,
),
)
print("solving...")
solver=libmambapy.solver.libsolv.Solver()
outcome=solver.solve(db, request)
ifisinstance(outcome, libmambapy.solver.libsolv.UnSolvable):
print(outcome.explain_problems(db, libmambapy.Palette.no_color()))
else:
print("OK!")
Troubleshooting docs
Anaconda default channels
How did you install Mamba?
Mambaforge or latest Miniforge
Search tried in issue tracker
Found invalid version predicate in
Latest version of Mamba
Tried in Conda?
Not applicable
Describe your issue
If a conflict involves a pinned package (e.g.
python
) andflags.allow_uninstall=False
,unsolvable.explain_problems()
fails withlibmambapy.bindings.specs.ParseError: Found invalid version predicate in "on python"
.Reproducer with Python
mamba info / micromamba info
Logs
No response
environment.yml
No response
~/.condarc
No response
The text was updated successfully, but these errors were encountered: