pythoncondamamba

"Package does not exist" error because Conda cannot find recent package versions


I have an existing Conda 23.1.0 environment managed using Mamba 1.5.1, which was created with the channels: conda-forge option. I want to install the latest version of the holidays package, which is 0.34.

However, mamba search holidays gives me

Loading channels: done
# Name                       Version           Build  Channel
holidays                       0.9.9            py_0  conda-forge
holidays                      0.9.10            py_0  conda-forge
...
holidays                        0.15    pyhd8ed1ab_0  conda-forge
holidays                        0.16    pyhd8ed1ab_0  conda-forge
holidays                        0.17    pyhd8ed1ab_0  conda-forge

If I try mamba install holidays=0.34 I get

Could not solve for environment specs
The following package could not be installed
ā””ā”€ holidays 0.34**  does not exist (perhaps a typo or a missing channel).

How do I update the list of available packages so I can install the latest version?

[Edit] The first time I tried this, this error popped up about zstandard missing. When I installed zstandard, the error disappeared but it didn't solve the problem, hence this question

/opt/mambaforge/lib/python3.10/site-packages/conda_package_streaming/package_streaming.py:19: UserWarning: zstandard could not be imported. Running without .conda support.
  warnings.warn("zstandard could not be imported. Running without .conda support.")
/opt/mambaforge/lib/python3.10/site-packages/conda_package_handling/api.py:29: UserWarning: Install zstandard Python bindings for .conda support
  _warnings.warn("Install zstandard Python bindings for .conda support")

[Edit 2] As it turned out, this was the actual error that was hidden:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/mambaforge/lib/python3.10/site-packages/zstandard/__init__.py", line 39, in <module>
    from .backend_c import *  # type: ignore
ImportError: zstd C API versions mismatch; Python bindings were not compiled/linked against expected zstd version (10505 returned by the lib, 10502 hardcoded in zstd headers, 10502 hardcoded in the cext)

Solution

  • Did you consider using the .conda file of your desired package : https://anaconda.org/conda-forge/holidays/files and install it from there ?

    Note : I know nothing about Anaconda but i did some research and that's the best i can find to help you, hope it'll help you