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

zstandard related install failures (need zstandard 0.21?) #241

Closed
2 tasks done
analog-cbarber opened this issue Jul 19, 2023 · 22 comments
Closed
2 tasks done

zstandard related install failures (need zstandard 0.21?) #241

analog-cbarber opened this issue Jul 19, 2023 · 22 comments
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@analog-cbarber
Copy link

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

In our CI builds, we noticed that after configuring the libmamba solver and installing certain packages in the base environment that we get failures installing some packages that appear to be related to the failure to import zstandard.

For example:

Running the following CI script (this is using gitlab CI):

    - '. /opt/conda/etc/profile.d/conda.sh'
    - conda activate base
    - conda config --set auto_update_conda false
    - conda install conda-libmamba-solver
    - conda config --set solver libmamba
    - conda install -c conda-forge curl twine wheel
    - conda create --yes -n foo -c conda-forge "mkdocstrings >=0.22"

The last step fails to find the package. There are warnings about not being able to import zstandard,
and that might be leading to the failure to find packages.

Note that the most recent zstandard from conda-forge is 0.19, but the latest from pip is 0.21.
If I install the pip one just before the conda create, it appears to fix the problem:

    - pip install "zstandard >=0.21"
    - conda create --yes -n foo -c conda-forge "mkdocstrings >=0.22"

The full CI log is:

Using docker image sha256:a101d1f8cd1cbfc6b0e91e4f1ce03e48a6bdca7987168647044a497e57411c56 for continuumio/miniconda3:latest with digest continuumio/miniconda3@sha256:42cd2ca0ece04579b6127e1a1a0f83c25a079145d408eb65e39206ac05069a77 ...
$ . /opt/conda/etc/profile.d/conda.sh
$ conda activate base
$ conda config --set auto_update_conda false
$ conda install conda-libmamba-solver
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
# All requested packages already installed.
$ conda config --set solver libmamba
$ conda install -c conda-forge curl twine wheel
Channels:
 - conda-forge
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
  environment location: /opt/conda
  added / updated specs:
    - curl
    - twine
    - wheel
The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    _libgcc_mutex-0.1          |      conda_forge           3 KB  conda-forge
    _openmp_mutex-4.5          |            2_gnu          23 KB  conda-forge
    bleach-6.0.0               |     pyhd8ed1ab_0         128 KB  conda-forge
    boltons-23.0.0             |     pyhd8ed1ab_0         296 KB  conda-forge
    brotli-python-1.0.9        |  py311ha362b79_9         3[19](https://gitlab.analog.com/CBarber/libmamba-issues/-/jobs/400857#L19) KB  conda-forge
    brotlipy-0.7.0             |py311hd4cff14_1005         345 KB  conda-forge
    bzip2-1.0.8                |       h7f98852_4         484 KB  conda-forge
    c-ares-1.19.1              |       hd590300_0         111 KB  conda-forge
    certifi-[20](https://gitlab.analog.com/CBarber/libmamba-issues/-/jobs/400857#L20)23.5.7           |     pyhd8ed1ab_0         149 KB  conda-forge
    cffi-1.15.1                |  py311h409f033_3         289 KB  conda-forge
    charset-normalizer-3.2.0   |     pyhd8ed1ab_0          45 KB  conda-forge
    cmarkgfm-0.8.0             |  py311hd4cff14_2         155 KB  conda-forge
    colorama-0.4.6             |     pyhd8ed1ab_0          25 KB  conda-forge
    conda-23.5.2               |  py311h38be061_0         1.3 MB  conda-forge
    conda-content-trust-0.1.1  |     pyhd3eb1b0_0          56 KB
    conda-libmamba-solver-23.5.0|     pyhd8ed1ab_0          40 KB  conda-forge
    conda-package-streaming-0.8.0|     pyhd8ed1ab_0          18 KB  conda-forge
    cryptography-41.0.2        |  py311h63ff55d_0         1.9 MB  conda-forge
    curl-8.2.0                 |       hca28451_0          89 KB  conda-forge
    dbus-1.13.6                |       h5008d03_3         604 KB  conda-forge
    docutils-0.20.1            |  py311h38be061_0         899 KB  conda-forge
    expat-2.5.0                |       hcb278e6_1         134 KB  conda-forge
    fmt-9.1.0                  |       h924138e_0         185 KB  conda-forge
    gettext-0.[21](https://gitlab.analog.com/CBarber/libmamba-issues/-/jobs/400857#L21).1             |       h27087fc_0         4.1 MB  conda-forge
    icu-72.1                   |       hcb278e6_0        11.4 MB  conda-forge
    idna-3.4                   |     pyhd8ed1ab_0          55 KB  conda-forge
    importlib-metadata-6.8.0   |     pyha770c72_0          25 KB  conda-forge
    importlib_metadata-6.8.0   |       hd8ed1ab_0           9 KB  conda-forge
    jaraco.classes-3.3.0       |     pyhd8ed1ab_0          11 KB  conda-forge
    jeepney-0.8.0              |     pyhd8ed1ab_0          36 KB  conda-forge
    jsonpatch-1.32             |     pyhd8ed1ab_0          14 KB  conda-forge
    keyring-24.2.0             |  py311h38be061_0          76 KB  conda-forge
    keyutils-1.6.1             |       h166bdaf_0         115 KB  conda-forge
    krb5-1.21.1                |       h659d440_0         1.3 MB  conda-forge
    ld_impl_linux-64-2.40      |       h41732ed_0         688 KB  conda-forge
    libarchive-3.6.2           |       h039dbb9_1         824 KB  conda-forge
    libcurl-8.2.0              |       hca28451_0         364 KB  conda-forge
    libev-4.33                 |       h516909a_1         104 KB  conda-forge
    libexpat-2.5.0             |       hcb278e6_1          76 KB  conda-forge
    libgcc-ng-13.1.0           |       he5830b7_0         758 KB  conda-forge
    libglib-2.76.4             |       hebfc3b9_0         2.6 MB  conda-forge
    libgomp-13.1.0             |       he5830b7_0         409 KB  conda-forge
    libiconv-1.17              |       h166bdaf_0         1.4 MB  conda-forge
    libmamba-1.4.9             |       h658169a_0         1.5 MB  conda-forge
    libmambapy-1.4.9           |  py311h527f279_0         282 KB  conda-forge
    libnghttp2-1.52.0          |       h61bc06f_0         608 KB  conda-forge
    libnsl-2.0.0               |       h7f98852_0          31 KB  conda-forge
    libsolv-0.7.24             |       hfc55251_1         456 KB  conda-forge
    libsqlite-3.42.0           |       h2797004_0         809 KB  conda-forge
    libssh2-1.11.0             |       h0841786_0         265 KB  conda-forge
    libstdcxx-ng-13.1.0        |       hfd8a6a1_0         3.7 MB  conda-forge
    libuuid-2.38.1             |       h0b41bf4_0          33 KB  conda-forge
    libxml2-2.11.4             |       h0d562d8_0         688 KB  conda-forge
    libzlib-1.2.13             |       hd590300_5          60 KB  conda-forge
    lz4-c-1.9.4                |       hcb278e6_0         140 KB  conda-forge
    lzo-2.10                   |    h516909a_1000         314 KB  conda-forge
    markdown-it-py-3.0.0       |     pyhd8ed1ab_0          63 KB  conda-forge
    mdurl-0.1.0                |     pyhd8ed1ab_0          13 KB  conda-forge
    more-itertools-9.1.0       |     pyhd8ed1ab_0          50 KB  conda-forge
    ncurses-6.4                |       hcb278e6_0         860 KB  conda-forge
    openssl-3.1.1              |       hd590300_1         2.5 MB  conda-forge
    packaging-23.1             |     pyhd8ed1ab_0          45 KB  conda-forge
    pcre2-10.40                |       hc3806b6_0         2.3 MB  conda-forge
    pip-23.2                   |     pyhd8ed1ab_0         1.3 MB  conda-forge
    pkginfo-1.9.6              |     pyhd8ed1ab_0          27 KB  conda-forge
    pluggy-1.2.0               |     pyhd8ed1ab_0          21 KB  conda-forge
    pybind11-abi-4             |       hd8ed1ab_3          10 KB  conda-forge
    pycosat-0.6.4              |  py311hd4cff14_1         111 KB  conda-forge
    pycparser-2.21             |     pyhd8ed1ab_0         100 KB  conda-forge
    pygments-2.15.1            |     pyhd8ed1ab_0         821 KB  conda-forge
    pyopenssl-23.2.0           |     pyhd8ed1ab_1         126 KB  conda-forge
    pysocks-1.7.1              |     pyha2e5f31_6          19 KB  conda-forge
    python-3.11.4              |hab00c5b_0_cpython        29.3 MB  conda-forge
    python_abi-3.11            |          3_cp311           6 KB  conda-forge
    readline-8.2               |       h8[22](https://gitlab.analog.com/CBarber/libmamba-issues/-/jobs/400857#L22)8510_1         275 KB  conda-forge
    readme_renderer-40.0       |     pyhd8ed1ab_0          18 KB  conda-forge
    reproc-14.2.4              |       h0b41bf4_0          30 KB  conda-forge
    reproc-cpp-14.2.4          |       hcb278e6_0          21 KB  conda-forge
    requests-2.31.0            |     pyhd8ed1ab_0          55 KB  conda-forge
    requests-toolbelt-1.0.0    |     pyhd8ed1ab_0          43 KB  conda-forge
    rfc3986-2.0.0              |     pyhd8ed1ab_0          33 KB  conda-forge
    rich-13.4.2                |     pyhd8ed1ab_0         179 KB  conda-forge
    ruamel.yaml-0.17.32        |  py311h459d7ec_0         274 KB  conda-forge
    ruamel.yaml.clib-0.2.7     |  py311h2582759_1         131 KB  conda-forge
    secretstorage-3.3.3        |  py311h38be061_1          30 KB  conda-forge
    setuptools-68.0.0          |     pyhd8ed1ab_0         453 KB  conda-forge
    six-1.16.0                 |     pyh6c4a22f_0          14 KB  conda-forge
    sqlite-3.42.0              |       h2c6b66d_0         799 KB  conda-forge
    tk-8.6.12                  |       h27826a3_0         3.3 MB  conda-forge
    toolz-0.12.0               |     pyhd8ed1ab_0          48 KB  conda-forge
    tqdm-4.65.0                |     pyhd8ed1ab_1          86 KB  conda-forge
    twine-4.0.2                |     pyhd8ed1ab_0          30 KB  conda-forge
    typing_extensions-4.7.1    |     pyha770c72_0          35 KB  conda-forge
    tzdata-20[23](https://gitlab.analog.com/CBarber/libmamba-issues/-/jobs/400857#L23)c               |       h71feb2d_0         115 KB  conda-forge
    urllib3-2.0.4              |     pyhd8ed1ab_0          96 KB  conda-forge
    webencodings-0.5.1         |             py_1          12 KB  conda-forge
    wheel-0.40.0               |     pyhd8ed1ab_1          56 KB  conda-forge
    yaml-cpp-0.7.0             |       h27087fc_2         215 KB  conda-forge
    zipp-3.16.2                |     pyhd8ed1ab_0          18 KB  conda-forge
    zlib-1.2.13                |       hd590300_5          91 KB  conda-forge
    zstandard-0.19.0           |  py311hbe0fcd7_1         385 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        84.9 MB
The following NEW packages will be INSTALLED:
  bleach             conda-forge/noarch::bleach-6.0.0-pyhd8ed1ab_0 
  brotli-python      conda-forge/linux-64::brotli-python-1.0.9-py311ha362b79_9 
  cmarkgfm           conda-forge/linux-64::cmarkgfm-0.8.0-py311hd4cff14_2 
  colorama           conda-forge/noarch::colorama-0.4.6-pyhd8ed1ab_0 
  curl               conda-forge/linux-64::curl-8.2.0-hca28451_0 
  dbus               conda-forge/linux-64::dbus-1.13.6-h5008d03_3 
  docutils           conda-forge/linux-64::docutils-0.20.1-py311h38be061_0 
  expat              conda-forge/linux-64::expat-2.5.0-hcb278e6_1 
  gettext            conda-forge/linux-64::gettext-0.21.1-h27087fc_0 
  importlib-metadata conda-forge/noarch::importlib-metadata-6.8.0-pyha770c72_0 
  importlib_metadata conda-forge/noarch::importlib_metadata-6.8.0-hd8ed1ab_0 
  jaraco.classes     conda-forge/noarch::jaraco.classes-3.3.0-pyhd8ed1ab_0 
  jeepney            conda-forge/noarch::jeepney-0.8.0-pyhd8ed1ab_0 
  keyring            conda-forge/linux-64::keyring-[24](https://gitlab.analog.com/CBarber/libmamba-issues/-/jobs/400857#L24).2.0-py311h38be061_0 
  keyutils           conda-forge/linux-64::keyutils-1.6.1-h166bdaf_0 
  libexpat           conda-forge/linux-64::libexpat-2.5.0-hcb278e6_1 
  libglib            conda-forge/linux-64::libglib-2.76.4-hebfc3b9_0 
  libiconv           conda-forge/linux-64::libiconv-1.17-h166bdaf_0 
  libnsl             conda-forge/linux-64::libnsl-2.0.0-h7f98852_0 
  libsqlite          conda-forge/linux-64::libsqlite-3.42.0-h2797004_0 
  libzlib            conda-forge/linux-64::libzlib-1.2.13-hd590300_5 
  lzo                conda-forge/linux-64::lzo-2.10-h516909a_1000 
  markdown-it-py     conda-forge/noarch::markdown-it-py-3.0.0-pyhd8ed1ab_0 
  mdurl              conda-forge/noarch::mdurl-0.1.0-pyhd8ed1ab_0 
  more-itertools     conda-forge/noarch::more-itertools-9.1.0-pyhd8ed1ab_0 
  pkginfo            conda-forge/noarch::pkginfo-1.9.6-pyhd8ed1ab_0 
  pygments           conda-forge/noarch::pygments-2.15.1-pyhd8ed1ab_0 
  python_abi         conda-forge/linux-64::python_abi-3.11-3_cp311 
  readme_renderer    conda-forge/noarch::readme_renderer-40.0-pyhd8ed1ab_0 
  requests-toolbelt  conda-forge/noarch::requests-toolbelt-1.0.0-pyhd8ed1ab_0 
  rfc3986            conda-forge/noarch::rfc3986-2.0.0-pyhd8ed1ab_0 
  rich               conda-forge/noarch::rich-13.4.2-pyhd8ed1ab_0 
  ruamel.yaml.clib   conda-forge/linux-64::ruamel.yaml.clib-0.2.7-py311h[25](https://gitlab.analog.com/CBarber/libmamba-issues/-/jobs/400857#L25)82759_1 
  secretstorage      conda-forge/linux-64::secretstorage-3.3.3-py311h38be061_1 
  twine              conda-forge/noarch::twine-4.0.2-pyhd8ed1ab_0 
  typing_extensions  conda-forge/noarch::typing_extensions-4.7.1-pyha770c72_0 
  webencodings       conda-forge/noarch::webencodings-0.5.1-py_1 
  zipp               conda-forge/noarch::zipp-3.16.2-pyhd8ed1ab_0 
The following packages will be UPDATED:
  brotlipy           pkgs/main::brotlipy-0.7.0-py311h5eee1~ --> conda-forge::brotlipy-0.7.0-py311hd4cff14_1005 
  bzip2                   pkgs/main::bzip2-1.0.8-h7b6447c_0 --> conda-forge::bzip2-1.0.8-h7f98852_4 
  c-ares                pkgs/main::c-ares-1.19.0-h5eee18b_0 --> conda-forge::c-ares-1.19.1-hd590300_0 
  charset-normalizer pkgs/main::charset-normalizer-2.0.4-p~ --> conda-forge::charset-normalizer-3.2.0-pyhd8ed1ab_0 
  cryptography       pkgs/main::cryptography-39.0.1-py311h~ --> conda-forge::cryptography-41.0.2-py311h63ff55d_0 
  icu                        pkgs/main::icu-58.2-he6710b0_3 --> conda-forge::icu-72.1-hcb278e6_0 
  krb5                    pkgs/main::krb5-1.20.1-h143b758_1 --> conda-forge::krb5-1.21.1-h659d440_0 
  ld_impl_linux-64   pkgs/main::ld_impl_linux-64-2.38-h118~ --> conda-forge::ld_impl_linux-64-2.40-h41732ed_0 
  libcurl               pkgs/main::libcurl-8.1.1-h251f7ec_1 --> conda-forge::libcurl-8.2.0-hca28451_0 
  libgcc-ng          pkgs/main::libgcc-ng-11.2.0-h1234567_1 --> conda-forge::libgcc-ng-13.1.0-he5830b7_0 
  libgomp              pkgs/main::libgomp-11.2.0-h1234567_1 --> conda-forge::libgomp-13.1.0-he5830b7_0 
  libmamba             pkgs/main::libmamba-1.4.1-h2dafd23_1 --> conda-forge::libmamba-1.4.9-h658169a_0 
  libmambapy         pkgs/main::libmambapy-1.4.1-py311h2da~ --> conda-forge::libmambapy-1.4.9-py311h527f279_0 
  libsolv              pkgs/main::libsolv-0.7.22-he621ea3_0 --> conda-forge::libsolv-0.7.24-hfc55251_1 
  libssh2              pkgs/main::libssh2-1.10.0-hdbd6064_2 --> conda-forge::libssh2-1.11.0-h0841786_0 
  libstdcxx-ng       pkgs/main::libstdcxx-ng-11.2.0-h12345~ --> conda-forge::libstdcxx-ng-13.1.0-hfd8a6a1_0 
  libuuid              pkgs/main::libuuid-1.41.5-h5eee18b_0 --> conda-forge::libuuid-2.38.1-h0b41bf4_0 
  libxml2              pkgs/main::libxml2-2.10.3-hcbfbd50_0 --> conda-forge::libxml2-2.11.4-h0d562d8_0 
  openssl               pkgs/main::openssl-3.0.9-h7f8727e_0 --> conda-forge::openssl-3.1.1-hd590300_1 
  packaging          pkgs/main/linux-64::packaging-23.0-py~ --> conda-forge/noarch::packaging-23.1-pyhd8ed1ab_0 
  pcre2                   pkgs/main::pcre2-10.37-he7ceb23_1 --> conda-forge::pcre2-10.40-hc3806b6_0 
  pip                pkgs/main/linux-64::pip-23.1.2-py311h~ --> conda-forge/noarch::pip-23.2-pyhd8ed1ab_0 
  pluggy             pkgs/main/linux-64::pluggy-1.0.0-py31~ --> conda-forge/noarch::pluggy-1.2.0-pyhd8ed1ab_0 
  pybind11-abi         pkgs/main::pybind11-abi-4-hd3eb1b0_1 --> conda-forge::pybind11-abi-4-hd8ed1ab_3 
  pycosat            pkgs/main::pycosat-0.6.4-py311h5eee18~ --> conda-forge::pycosat-0.6.4-py311hd4cff14_1 
  pyopenssl          pkgs/main/linux-64::pyopenssl-23.0.0-~ --> conda-forge/noarch::pyopenssl-23.2.0-pyhd8ed1ab_1 
  pysocks            pkgs/main/linux-64::pysocks-1.7.1-py3~ --> conda-forge/noarch::pysocks-1.7.1-pyha2e5f31_6 
  readline               pkgs/main::readline-8.2-h5eee18b_0 --> conda-forge::readline-8.2-h8228510_1 
  requests           pkgs/main/linux-64::requests-2.29.0-p~ --> conda-forge/noarch::requests-2.31.0-pyhd8ed1ab_0 
  ruamel.yaml        pkgs/main::ruamel.yaml-0.17.21-py311h~ --> conda-forge::ruamel.yaml-0.17.32-py311h459d7ec_0 
  setuptools         pkgs/main/linux-64::setuptools-67.8.0~ --> conda-forge/noarch::setuptools-68.0.0-pyhd8ed1ab_0 
  sqlite                pkgs/main::sqlite-3.41.2-h5eee18b_0 --> conda-forge::sqlite-3.42.0-h2c6b66d_0 
  tqdm               pkgs/main/linux-64::tqdm-4.65.0-py311~ --> conda-forge/noarch::tqdm-4.65.0-pyhd8ed1ab_1 
  urllib3            pkgs/main/linux-64::urllib3-1.[26](https://gitlab.analog.com/CBarber/libmamba-issues/-/jobs/400857#L26).16-p~ --> conda-forge/noarch::urllib3-2.0.4-pyhd8ed1ab_0 
  wheel              pkgs/main/linux-64::wheel-0.38.4-py31~ --> conda-forge/noarch::wheel-0.40.0-pyhd8ed1ab_1 
  yaml-cpp             pkgs/main::yaml-cpp-0.7.0-h295c915_1 --> conda-forge::yaml-cpp-0.7.0-h[27](https://gitlab.analog.com/CBarber/libmamba-issues/-/jobs/400857#L27)087fc_2 
  zlib                    pkgs/main::zlib-1.2.13-h5eee18b_0 --> conda-forge::zlib-1.2.13-hd590300_5 
  zstandard          pkgs/main::zstandard-0.19.0-py311h5ee~ --> conda-forge::zstandard-0.19.0-py311hbe0fcd7_1 
The following packages will be SUPERSEDED by a higher-priority channel:
  _libgcc_mutex           pkgs/main::_libgcc_mutex-0.1-main --> conda-forge::_libgcc_mutex-0.1-conda_forge 
  _openmp_mutex          pkgs/main::_openmp_mutex-5.1-1_gnu --> conda-forge::_openmp_mutex-4.5-2_gnu 
  boltons            pkgs/main/linux-64::boltons-23.0.0-py~ --> conda-forge/noarch::boltons-23.0.0-pyhd8ed1ab_0 
  certifi            pkgs/main/linux-64::certifi-2023.5.7-~ --> conda-forge/noarch::certifi-2023.5.7-pyhd8ed1ab_0 
  cffi               pkgs/main::cffi-1.15.1-py311h5eee18b_3 --> conda-forge::cffi-1.15.1-py311h409f033_3 
  conda              pkgs/main::conda-23.5.2-py311h06a4308~ --> conda-forge::conda-23.5.2-py311h38be061_0 
  conda-content-tru~ pkgs/main/linux-64::conda-content-tru~ --> pkgs/main/noarch::conda-content-trust-0.1.1-pyhd3eb1b0_0 
  conda-libmamba-so~ pkgs/main/linux-64::conda-libmamba-so~ --> conda-forge/noarch::conda-libmamba-solver-23.5.0-pyhd8ed1ab_0 
  conda-package-str~ pkgs/main/linux-64::conda-package-str~ --> conda-forge/noarch::conda-package-streaming-0.8.0-pyhd8ed1ab_0 
  fmt                       pkgs/main::fmt-9.1.0-hdb19cb5_0 --> conda-forge::fmt-9.1.0-h924138e_0 
  idna               pkgs/main/linux-64::idna-3.4-py311h06~ --> conda-forge/noarch::idna-3.4-pyhd8ed1ab_0 
  jsonpatch          pkgs/main::jsonpatch-1.32-pyhd3eb1b0_0 --> conda-forge::jsonpatch-1.32-pyhd8ed1ab_0 
  libarchive         pkgs/main::libarchive-3.6.2-h6ac8c49_2 --> conda-forge::libarchive-3.6.2-h039dbb9_1 
  libev                    pkgs/main::libev-4.33-h7f8727e_1 --> conda-forge::libev-4.33-h516909a_1 
  libnghttp2         pkgs/main::libnghttp2-1.52.0-h2d74bed~ --> conda-forge::libnghttp2-1.52.0-h61bc06f_0 
  lz4-c                   pkgs/main::lz4-c-1.9.4-h6a678d5_0 --> conda-forge::lz4-c-1.9.4-hcb278e6_0 
  ncurses                 pkgs/main::ncurses-6.4-h6a678d5_0 --> conda-forge::ncurses-6.4-hcb278e6_0 
  pycparser          pkgs/main::pycparser-2.21-pyhd3eb1b0_0 --> conda-forge::pycparser-2.21-pyhd8ed1ab_0 
  python                pkgs/main::python-3.11.4-h955ad1f_0 --> conda-forge::python-3.11.4-hab00c5b_0_cpython 
  reproc                pkgs/main::reproc-14.2.4-h295c915_1 --> conda-forge::reproc-14.2.4-h0b41bf4_0 
  reproc-cpp         pkgs/main::reproc-cpp-14.2.4-h295c915~ --> conda-forge::reproc-cpp-14.2.4-hcb278e6_0 
  six                    pkgs/main::six-1.16.0-pyhd3eb1b0_1 --> conda-forge::six-1.16.0-pyh6c4a22f_0 
  tk                        pkgs/main::tk-8.6.12-h1ccaba5_0 --> conda-forge::tk-8.6.12-h27826a3_0 
  toolz              pkgs/main/linux-64::toolz-0.12.0-py31~ --> conda-forge/noarch::toolz-0.12.0-pyhd8ed1ab_0 
  tzdata                 pkgs/main::tzdata-2023c-h04d1e81_0 --> conda-forge::tzdata-2023c-h71feb2d_0 
Proceed ([y]/n)? 
Downloading and Extracting Packages
libev-4.33           | 104 KB    |            |   0% 
reproc-14.2.4        | 30 KB     |            |   0% 
packaging-23.1       | 45 KB     |            |   0% 
libsqlite-3.42.0     | 809 KB    |            |   0% 
gettext-0.21.1       | 4.1 MB    |            |   0% 
requests-2.31.0      | 55 KB     |            |   0% 
twine-4.0.2          | 30 KB     |            |   0% 
pycparser-2.21       | 100 KB    |            |   0% 
pip-23.2             | 1.3 MB    |            |   0% 
brotli-python-1.0.9  | 319 KB    |            |   0% 
zlib-1.2.13          | 91 KB     |            |   0% 
libssh2-1.11.0       | 265 KB    |            |   0% 
libstdcxx-ng-13.1.0  | 3.7 MB    |            |   0% 
requests-toolbelt-1. | 43 KB     |            |   0% 
reproc-cpp-14.2.4    | 21 KB     |            |   0% 
libmamba-1.4.9       | 1.5 MB    |            |   0% 
pluggy-1.2.0         | 21 KB     |            |   0% 
lz4-c-1.9.4          | 140 KB    |            |   0% 
pkginfo-1.9.6        | 27 KB     |            |   0% 
 ... (more hidden) ...
libev-4.33           | 104 KB    | #5         |  15% 
packaging-23.1       | 45 KB     | ###5       |  36% 
libsqlite-3.42.0     | 809 KB    | 1          |   2% 
gettext-0.21.1       | 4.1 MB    |            |   0% 
requests-2.31.0      | 55 KB     | ##8        |  29% 
reproc-14.2.4        | 30 KB     | ########## | 100% 
twine-4.0.2          | 30 KB     | #####3     |  53% 
pycparser-2.21       | 100 KB    | #5         |  16% 
pip-23.2             | 1.3 MB    | 1          |   1% 
brotli-python-1.0.9  | 319 KB    | 5          |   5% 
zlib-1.2.13          | 91 KB     | #7         |  18% 
libev-4.33           | 104 KB    | ########## | 100% 
libstdcxx-ng-13.1.0  | 3.7 MB    |            |   0% 
packaging-23.1       | 45 KB     | ########## | 100% 
requests-2.31.0      | 55 KB     | ########## | 100% 
packaging-23.1       | 45 KB     | ########## | 100% 
gettext-0.21.1       | 4.1 MB    | #####      |  50% 
requests-toolbelt-1. | 43 KB     | ###7       |  37% 
reproc-cpp-14.2.4    | 21 KB     | #######5   |  76% 
libmamba-1.4.9       | 1.5 MB    | 1          |   1% 
pluggy-1.2.0         | 21 KB     | #######6   |  76% 
lz4-c-1.9.4          | 140 KB    | #1         |  11% 
twine-4.0.2          | 30 KB     | ########## | 100% 
twine-4.0.2          | 30 KB     | ########## | 100% 
pkginfo-1.9.6        | 27 KB     | #####9     |  59% 
libstdcxx-ng-13.1.0  | 3.7 MB    | ######6    |  67% 
 ... (more hidden) ...
libsqlite-3.42.0     | 809 KB    | ########## | 100% 
libsqlite-3.42.0     | 809 KB    | ########## | 100% 
zlib-1.2.13          | 91 KB     | ########## | 100% 
zlib-1.2.13          | 91 KB     | ########## | 100% 
brotli-python-1.0.9  | 319 KB    | ########## | 100% 
brotli-python-1.0.9  | 319 KB    | ########## | 100% 
pycparser-2.21       | 100 KB    | ########## | 100% 
pycparser-2.21       | 100 KB    | ########## | 100% 
reproc-cpp-14.2.4    | 21 KB     | ########## | 100% 
libssh2-1.11.0       | 265 KB    | ########## | 100% 
libssh2-1.11.0       | 265 KB    | ########## | 100% 
requests-toolbelt-1. | 43 KB     | ########## | 100% 
requests-toolbelt-1. | 43 KB     | ########## | 100% 
pluggy-1.2.0         | 21 KB     | ########## | 100% 
pluggy-1.2.0         | 21 KB     | ########## | 100% 
lz4-c-1.9.4          | 140 KB    | ########## | 100% 
lz4-c-1.9.4          | 140 KB    | ########## | 100% 
pkginfo-1.9.6        | 27 KB     | ########## | 100% 
pkginfo-1.9.6        | 27 KB     | ########## | 100% 
libmamba-1.4.9       | 1.5 MB    | ########## | 100% 
libmamba-1.4.9       | 1.5 MB    | ########## | 100% 
 ... (more hidden) ...
 ... (more hidden) ...
pip-23.2             | 1.3 MB    | ########## | 100% 
pip-23.2             | 1.3 MB    | ########## | 100% 
libstdcxx-ng-13.1.0  | 3.7 MB    | ########## | 100% 
gettext-0.21.1       | 4.1 MB    | ########## | 100% 
gettext-0.21.1       | 4.1 MB    | ########## | 100% 
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
                                                     
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
$ conda create --yes -n foo -c conda-forge "mkdocstrings >=0.22"
/opt/conda/lib/python3.11/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/conda/lib/python3.11/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")
/opt/conda/lib/python3.11/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/conda/lib/python3.11/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")
Channels:
 - conda-forge
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed
PackagesNotFoundError: The following packages are not available from current channels:
  - mkdocstrings[version='>=0.22']
Current channels:
  - https://conda.anaconda.org/conda-forge
  - defaults
To search for alternate channels that may provide the conda package you're
looking for, navigate to
    https://anaconda.org/
and use the search bar at the top of the page.
Note: 'use_only_tar_bz2' is enabled. This might be omitting some
packages from the index. Set this option to 'false' and retry.```

### Conda Info

_No response_

### Conda Config

_No response_

### Conda list

_No response_

### Additional Context

_No response_
@analog-cbarber analog-cbarber added the type::bug describes erroneous operation, use severity::* to classify the type label Jul 19, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Jul 19, 2023
@analog-cbarber
Copy link
Author

analog-cbarber commented Jul 19, 2023

Not sure whether a conda-forge version of zstandard 0.21 will fix all of this.

also see:

@jaimergp
Copy link
Contributor

I am also curious about the note:

Note: 'use_only_tar_bz2' is enabled. This might be omitting some
packages from the index. Set this option to 'false' and retry.

However, I don't think this is strictly conda-libmamba-solver related, so this might belong better in conda proper or conda-package-{handling,streaming}. That warning comes from this block:

try:
    import zstandard
except ImportError:
    import warnings

    warnings.warn("zstandard could not be imported. Running without .conda support.")

    zstandard = None

, which is swallowing the actual exception. I am going to see if I can inspect the error there, locally.

@jaimergp
Copy link
Contributor

0.19 Works ok on my machine:

$ conda create -n cps-zstd conda-package-streaming
Channels:
 - conda-forge
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
    current version: 23.5.0
    latest version: 23.5.2

Please update conda by running

    $ conda update -n base -c conda-forge conda



## Package Plan ##

  environment location: /Users/jrodriguez/.local/anaconda/envs/cps-zstd

  added / updated specs:
    - conda-package-streaming


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    zstandard-0.19.0           |  py311hae4035a_2         326 KB  conda-forge
    zstd-1.5.2                 |       h4f39d0f_7         310 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         636 KB

The following NEW packages will be INSTALLED:

  bzip2              conda-forge/osx-arm64::bzip2-1.0.8-h3422bc3_4 
  ca-certificates    conda-forge/osx-arm64::ca-certificates-2023.5.7-hf0a4a13_0 
  cffi               conda-forge/osx-arm64::cffi-1.15.1-py311hae827db_3 
  conda-package-str~ conda-forge/noarch::conda-package-streaming-0.8.0-pyhd8ed1ab_0 
  libexpat           conda-forge/osx-arm64::libexpat-2.5.0-hb7217d7_1 
  libffi             conda-forge/osx-arm64::libffi-3.4.2-h3422bc3_5 
  libsqlite          conda-forge/osx-arm64::libsqlite-3.42.0-hb31c410_0 
  libzlib            conda-forge/osx-arm64::libzlib-1.2.13-h53f4e23_5 
  ncurses            conda-forge/osx-arm64::ncurses-6.4-h7ea286d_0 
  openssl            conda-forge/osx-arm64::openssl-3.1.1-h53f4e23_1 
  pycparser          conda-forge/noarch::pycparser-2.21-pyhd8ed1ab_0 
  python             conda-forge/osx-arm64::python-3.11.4-h47c9636_0_cpython 
  python_abi         conda-forge/osx-arm64::python_abi-3.11-3_cp311 
  readline           conda-forge/osx-arm64::readline-8.2-h92ec313_1 
  tk                 conda-forge/osx-arm64::tk-8.6.12-he1e0b03_0 
  tzdata             conda-forge/noarch::tzdata-2023c-h71feb2d_0 
  xz                 conda-forge/osx-arm64::xz-5.2.6-h57fd34a_0 
  zstandard          conda-forge/osx-arm64::zstandard-0.19.0-py311hae4035a_2 
  zstd               conda-forge/osx-arm64::zstd-1.5.2-h4f39d0f_7 


Proceed ([y]/n)? 


Downloading and Extracting Packages
                                                                                
Preparing transaction: done                                                     
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate cps-zstd
#
# To deactivate an active environment, use
#
#     $ conda deactivate
$ python                                          
Python 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:08:41) [Clang 15.0.7 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from conda_package_streaming.package_streaming import zstandard
>>> zstandard
<module 'zstandard' from '/Users/jrodriguez/.local/anaconda/envs/cps-zstd/lib/python3.11/site-packages/zstandard/__init__.py'> 

So I think it might have to do with the fact that you are mixing defaults and conda-forge. Can you reproduce this if you start by installing Miniforge instead of Miniconda so you are in a full conda-forge setup?

@jaimergp
Copy link
Contributor

To debug, please add the following statements to your CI config, before the problematic line:

$ conda config --show-sources
$ python -c "import zstandard"

In the meantime, I am going to see if I can reproduce with the Docker image.

@jaimergp
Copy link
Contributor

Yea, it's an ABI incompatibility:

python -c "import zstandard"                                                                                                                                                                                                                          
Traceback (most recent call last):                                                                                                                                                                                                                                                
  File "<string>", line 1, in <module>                                                                                                                                                                                                                                            
  File "/opt/conda/lib/python3.11/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) 

zstd comes from defaults and zstandard comes from conda-forge, which would explain the incompatibility:

$ conda list
...
wheel                     0.40.0             pyhd8ed1ab_1    conda-forge
xz                        5.4.2                h5eee18b_0  
yaml-cpp                  0.7.0                h27087fc_2    conda-forge
zipp                      3.16.2             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge
zstandard                 0.19.0          py311hbe0fcd7_1    conda-forge
zstd                      1.5.5                hc292b87_0  

@jaimergp
Copy link
Contributor

I can fix this by dropping -c conda-forge from the conda install -c conda-forge curl twine wheel command. Mixing channels in the base env is usually a bad idea due to this incompatibilities, which can break conda.

@analog-cbarber
Copy link
Author

Thanks for responding.

I don't actually want the anaconda defaults but didn't bother to remove them or choose a different docker image, but switching to condaforge/miniforge3 does fix the issue.

Although not recommended, we have getting away with mixing anoconda and conda-forge in our CI jobs for years now, so obviously this kind of problem is not that common, perhaps because most low-level libraries have usually been compatible between the two.

I wonder if better error or warning behavior would be useful here....

@analog-cbarber
Copy link
Author

So using miniforge3 fixes my toy reproducible example but when I try it on my real repo, I now am getting a libmamba Could not parse state file warning followed by a crash.

I will see if I can get a reproducible case I can give you. Note that we are installing a package from our own custom channel here:

$ conda install -c conda-forge -c garage-conda-local make "garconda>=0.3.4"
warning  libmamba Could not parse state file: Could not load cache state: [json.exception.type_error.302] type must be string, but is null
warning  libmamba Could not parse state file: Could not load cache state: [json.exception.type_error.302] type must be string, but is null
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.10/site-packages/conda/exceptions.py", line 1124, in __call__
        return func(*args, **kwargs)
      File "/opt/conda/lib/python3.10/site-packages/conda/cli/main.py", line 69, in main_subshell
        exit_code = do_call(args, p)
      File "/opt/conda/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 91, in do_call
        return getattr(module, func_name)(args, parser)
      File "/opt/conda/lib/python3.10/site-packages/conda/notices/core.py", line 109, in wrapper
        return func(*args, **kwargs)
      File "/opt/conda/lib/python3.10/site-packages/conda/cli/main_install.py", line 20, in execute
        install(args, parser, 'install')
      File "/opt/conda/lib/python3.10/site-packages/conda/cli/install.py", line 264, in install
        unlink_link_transaction = solver.solve_for_transaction(
      File "/opt/conda/lib/python3.10/site-packages/conda/core/solve.py", line 132, in solve_for_transaction
        unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
      File "/opt/conda/lib/python3.10/site-packages/conda/core/solve.py", line 175, in solve_for_diff
        final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
      File "/opt/conda/lib/python3.10/site-packages/conda_libmamba_solver/solver.py", line 167, in solve_final_state
        index = LibMambaIndexHelper(
      File "/opt/conda/lib/python3.10/site-packages/conda_libmamba_solver/index.py", line 71, in __init__
        self._index = self._load_channels()
      File "/opt/conda/lib/python3.10/site-packages/conda_libmamba_solver/index.py", line 262, in _load_channels
        set_channel_priorities(self._pool, full_index, self._repos)
      File "/opt/conda/lib/python3.10/site-packages/conda_libmamba_solver/mamba_utils.py", line 162, in set_channel_priorities
        repo = subdir_or_repo.create_repo(pool)
    libmambapy.bindings.MambaNativeException: Cache not loaded
`$ /opt/conda/bin/conda install -c conda-forge -c garage-conda-local make garconda>=0.3.4`
  environment variables:
                 CIO_TEST=<not set>
           CI_CONFIG_PATH=.gitlab-ci.yml
          CI_PROJECT_PATH=greenh2/fw/jolene-client
        CONDA_DEFAULT_ENV=base
                CONDA_DIR=/opt/conda
                CONDA_EXE=/opt/conda/bin/conda
             CONDA_PREFIX=/opt/conda
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=/opt/conda/bin/python
               CONDA_ROOT=/opt/conda
              CONDA_SHLVL=1
           CURL_CA_BUNDLE=<not set>
               LD_PRELOAD=<not set>
                     PATH=/opt/conda/bin:/opt/conda/condabin:/opt/conda/bin:/usr/local/sbin:/usr
                          /local/bin:/usr/sbin:/usr/bin:/sbin:/bin
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
     active environment : base
    active env location : /opt/conda
            shell level : 1
       user config file : /root/.condarc
 populated config files : /opt/conda/.condarc
                          /root/.condarc
          conda version : 23.1.0
    conda-build version : not installed
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.31=0
                          __linux=4.18.0=0
                          __unix=0=0
       base environment : /opt/conda  (writable)
      conda av data dir : /opt/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://artifactory.analog.com/artifactory/garage-conda-local/linux-64
                          https://artifactory.analog.com/artifactory/garage-conda-local/noarch
          package cache : /opt/conda/pkgs
                          /root/.conda/pkgs
       envs directories : /opt/conda/envs
                          /root/.conda/envs
               platform : linux-64
             user-agent : conda/23.1.0 requests/2.31.0 CPython/3.10.12 Linux/4.18.0-305.el8.x86_64 ubuntu/20.04.6 glibc/2.31 solver/libmamba conda-libmamba-solver/22.8.1 libmambapy/1.4.9
                UID:GID : 0:0
             netrc file : None
           offline mode : False
An unexpected error has occurred. Conda has prepared the above report.

@analog-cbarber
Copy link
Author

That parse state error goes away when I remove the conda autoupdate restriction.

@jezdez
Copy link
Member

jezdez commented Jul 20, 2023

@dholth interesting thing, have you seen this before?

@dholth
Copy link
Contributor

dholth commented Jul 20, 2023

I have seen problems with zstd/zstandard mismatch before but not quite like this.

  • It looks like we claim "use_only_tar_bz2" is enabled when it is turned on for "no zstandard available" reasons, not because someone set the option in their .condarc. We should explain conda is turned off for dependency and not settings reasons.
  • Can we hotfix a constrains to zstd or a requirement on a specific zstd + build numberr for the zstandard Python bindings so that they cannot be installed with mismatching versions?
  • zstandard could bundle zstd as it does on pypi instead of linking against the package. Was this changed recently? There was some discussion about whether zstandard included the zstd licence correctly and one solution was to go the dynamic linking route to avoid bundling. However bundling them together, and also including both the bindings license and the zstd licence, would be more reliable.

@dholth
Copy link
Contributor

dholth commented Jul 20, 2023

See also conda-forge/zstandard-feedstock#48

@jaimergp
Copy link
Contributor

conda-forge's zstandard uses an external zstd, but defaults' uses the bundled one. conda-forge's zstandard is picking defaults' zstd, which is not guaranteed to be the same because the previous builds (<_2) did not pin zstd like build number 2 does. I don't know if we can reliably get a repodata patch for the previous builds (might need to inspect the rendered recipe inside the package for each one).

@jaimergp
Copy link
Contributor

Added this patch to prevent this incompatibility from occurring just in case: conda-forge/conda-forge-repodata-patches-feedstock#484

@jaimergp
Copy link
Contributor

The patch above was merged so this particular issue is now fixed. Note that other conflicts in dependencies when defaults and conda-forge are mixed (e.g. libarchive) are still possible, though.

@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning Jul 27, 2023
@rootsmusic
Copy link

rootsmusic commented Sep 26, 2023

With zstandard 0.19.0 in my base environment, conda showed a warning. conda also wouldn't update and asserted that "All requested packages already installed" (but not their updated versions). All have been fixed by first updating zstandard.

P.S. now I'm looking for the feedstock where I can request updating https://anaconda.org/intel/zstandard

@dholth
Copy link
Contributor

dholth commented Sep 26, 2023

@rootsmusic
Copy link

rootsmusic commented Sep 26, 2023

No @dholth, both of those feedstocks show the current release's version is 0.21.0. Intel's feedstock has packages (including an older zstandard) for its version of python.

@dholth
Copy link
Contributor

dholth commented Sep 26, 2023

I see that the AnacondaRecipes version is still 0.19. I'm confused about whether they bundle or link to zstd, since I don't see any recent recipe changes to that effect, but I remember a discussion about the license and changing to a link model. I also see a conditional in the conda-forge recipe, seems like the comment could be left out on this line - zstd {{ zstd_version }} # [build_platform != target_platform]

@rootsmusic
Copy link

rootsmusic commented Sep 26, 2023

@dholth anacondarecipes shows 0.21.0, but the public release is the older version. I don't install from anaconda's channel, but I think you're suggesting that Intel may be forked from anaconda's channel.

P.S. you commented about zstd's license in a closed issue.

@dholth
Copy link
Contributor

dholth commented Sep 26, 2023

I see https://github.com/AnacondaRecipes/zstandard-feedstock/blob/master/recipe/meta.yaml#L2

The forked recipe appears to be linking to a conda-forge status badge.

I also see that zstandard includes a cffi backend and an ordinarily-used "c extension" or cext backend (zstandard.backend == "cext"). The anaconda 0.19 version does not link with libzstd ldd backend_c.cpython-39-aarch64-linux-gnu.so but the conda-forge 0.21 version does libzstd.so.1 => /opt/conda/lib/python3.9/site-packages/zstandard/./../../../libzstd.so.1 (0x0000ffffb72c0000).

@net20
Copy link

net20 commented Nov 15, 2023

Note that you can get into this incompatible-versions state without needing to mix channels; running mamba update mamba on a fresh Mambaforge 23.1.0 (note: not the current version, unless you foolishly trust winget to have updated Mambaforge since its merger with Miniforge) will currently do it, because somehow mamba depends on zstd but not zstandard. So on an update, zstandard gets left behind.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

No branches or pull requests

6 participants