mamba warning: "zstandard could not be imported", although installed

254 views Asked by At

After a recent update of Mamba to 1.5.1 in my mambaforge installation, I'm getting the following warning displayed when executing any mamba / conda command:

C:\Users\dummy\mambaforge\lib\site-packages\conda_package_streaming\package_streaming.py:25: UserWarning: zstandard could not be imported. Running without .conda support.
  warnings.warn("zstandard could not be imported. Running without .conda support.")
C:\Users\dummy\mambaforge\lib\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")

After te message, the command seems to get executed correctly. I already tried the following steps without any change of this behaviour:

  • mamba install zstandard
  • mamba uninstall zstandard, then mamba install zstandard
  • mamba install zstandard --force-reinstall

All of these commands seem to execute properly (right after displaying said warning message), but the warning remains.

Even moe strange, this is the output of

mamba list |grep -i zstand
C:\Users\dummy\mambaforge\lib\site-packages\conda_package_streaming\package_streaming.py:25: UserWarning: zstandard could not be imported. Running without .conda support.
  warnings.warn("zstandard could not be imported. Running without .conda support.")
C:\Users\dummy\mambaforge\lib\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")
zstandard                 0.19.0          py310h2bbff1b_0

So it knows that zstandard is installed, but still gives the warning.

1

There are 1 answers

0
PHPirate On

zstandard 0.19 has a bug which prevents conda from updating any packages, including zstandard itself.

To work around this, update zstandard via pip first: pip install --force-reinstall zstandard zstd

For more info see my full answer here: https://stackoverflow.com/a/77340146/4126843