conda / conda-libmamba-solver

The libmamba based solver for conda.
https://conda.github.io/conda-libmamba-solver/
Other
199 stars 24 forks source link

Error while loading conda entry point: conda-libmamba-solver (module 'libmambapy' has no attribute 'QueryFormat') #540

Open CsatiZoltan opened 14 hours ago

CsatiZoltan commented 14 hours ago

Checklist

What happened?

After updating mamba to from 1.5.9 to 2.0.2 (which automatically updated the dependencies libmamba and libmambapy, in addition to fmt from 10.2.1 to 11.0.2), the mamba update commands display the error in the title of this issue. I can install packages, but after the "Transaction finished" message, the additional error message is displayed. I use mambaforge.

Conda Info

Error while loading conda entry point: conda-libmamba-solver (module 'libmambapy' has no attribute 'QueryFormat')

     active environment : base
    active env location : /home/zozo/mambaforge
            shell level : 1
       user config file : /home/zozo/.condarc
 populated config files : /home/zozo/mambaforge/.condarc
                          /home/zozo/.condarc
          conda version : 24.9.1
    conda-build version : not installed
         python version : 3.10.13.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=icelake
                          __conda=24.9.1=0
                          __glibc=2.35=0
                          __linux=6.9.3=0
                          __unix=0=0
       base environment : /home/zozo/mambaforge  (writable)
      conda av data dir : /home/zozo/mambaforge/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /home/zozo/mambaforge/pkgs
                          /home/zozo/.conda/pkgs
       envs directories : /media/zozo/SATA_SSD/conda_envs
                          /home/zozo/mambaforge/envs
                          /home/zozo/.conda/envs
               platform : linux-64
             user-agent : conda/24.9.1 requests/2.32.3 CPython/3.10.13 Linux/6.9.3-76060903-generic pop/22.04 glibc/2.35 solver/libmamba
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Conda Config

Error while loading conda entry point: conda-libmamba-solver (module 'libmambapy' has no attribute 'QueryFormat')
==> /home/zozo/mambaforge/.condarc <==
channels:
  - conda-forge

==> /home/zozo/.condarc <==
envs_dirs:
  - /media/zozo/SATA_SSD/conda_envs/
channels:
  - conda-forge

Conda list

Error while loading conda entry point: conda-libmamba-solver (module 'libmambapy' has no attribute 'QueryFormat')
# packages in environment at /home/zozo/mambaforge:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
aom                       3.9.1                hac33072_0    conda-forge
archspec                  0.2.3              pyhd8ed1ab_0    conda-forge
arrow                     1.3.0                    pypi_0    pypi
bash-completion           2.11                 ha770c72_1    conda-forge
bat                       0.24.0               he8a937b_0    conda-forge
binaryornot               0.4.4                    pypi_0    pypi
boltons                   23.0.0             pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                h166bdaf_9    conda-forge
brotli-bin                1.0.9                h166bdaf_9    conda-forge
brotli-python             1.0.9           py310hd8f1fbe_9    conda-forge
brotlicffi                1.0.9.2         py310hd8f1fbe_3    conda-forge
brotlipy                  0.7.0           py310h5764c6d_1005    conda-forge
build                     1.2.1                    pypi_0    pypi
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.24.0               hd590300_0    conda-forge
ca-certificates           2024.8.30            hbcca054_0    conda-forge
cairo                     1.18.0               hebfffa5_3    conda-forge
certifi                   2024.8.30          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310h255011f_3    conda-forge
chardet                   5.2.0                    pypi_0    pypi
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
click                     8.1.7                    pypi_0    pypi
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     24.9.1          py310hff52083_0    conda-forge
conda-bash-completion     1.7                  ha770c72_1    conda-forge
conda-libmamba-solver     23.11.0            pyhd8ed1ab_0    conda-forge
conda-package-handling    2.2.0              pyh38be061_0    conda-forge
conda-package-streaming   0.9.0              pyhd8ed1ab_0    conda-forge
cookiecutter              2.6.0                    pypi_0    pypi
cpp-expected              1.1.0                hf52228f_0    conda-forge
cryptography              41.0.2          py310h75e40e8_0    conda-forge
dav1d                     1.2.1                hd590300_0    conda-forge
distro                    1.8.0              pyhd8ed1ab_0    conda-forge
expat                     2.6.2                h59595ed_0    conda-forge
ffmpeg                    7.1.0           gpl_h8657690_700    conda-forge
fmt                       11.0.2               h434a139_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.2               h14ed4e7_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
fribidi                   1.0.10               h36c2ea0_0    conda-forge
frozendict                2.4.4           py310hc51659f_0    conda-forge
fzf                       0.55.0               ha8f183a_0    conda-forge
gettext                   0.21.1               h27087fc_0    conda-forge
gitdb                     4.0.11                   pypi_0    pypi
gitpython                 3.1.43                   pypi_0    pypi
gmp                       6.3.0                h59595ed_0    conda-forge
gnutls                    3.8.7                h32866dd_0    conda-forge
graphite2                 1.3.13            h58526e2_1001    conda-forge
harfbuzz                  9.0.0                hda332d3_1    conda-forge
icu                       75.1                 he02047a_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4                    pypi_0    pypi
jsonpatch                 1.33               pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py310hff52083_3    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.21.3               h659f571_0    conda-forge
lame                      3.100             h166bdaf_1003    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libabseil                 20240116.2      cxx17_he02047a_1    conda-forge
libarchive                3.7.4                hfca40fe_0    conda-forge
libass                    0.17.3               h1dc1e6a_0    conda-forge
libbrotlicommon           1.0.9                h166bdaf_9    conda-forge
libbrotlidec              1.0.9                h166bdaf_9    conda-forge
libbrotlienc              1.0.9                h166bdaf_9    conda-forge
libcurl                   8.9.1                hdb1bdb2_0    conda-forge
libdrm                    2.4.122              h4ab18f5_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libexpat                  2.6.2                h59595ed_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc                    14.1.0               h77fa898_1    conda-forge
libgcc-ng                 14.1.0               h69a702a_1    conda-forge
libglib                   2.80.3               h315aac3_2    conda-forge
libgomp                   14.1.0               h77fa898_1    conda-forge
libhwloc                  2.11.1          default_hecaa2ac_1000    conda-forge
libiconv                  1.17                 h166bdaf_0    conda-forge
libidn2                   2.3.4                h166bdaf_0    conda-forge
libmamba                  2.0.2                hf72d635_0    conda-forge
libmambapy                2.0.2           py310h6639945_0    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libopenvino               2024.4.0             hac27bb2_0    conda-forge
libopenvino-auto-batch-plugin 2024.4.0             h4d9b6c2_0    conda-forge
libopenvino-auto-plugin   2024.4.0             h4d9b6c2_0    conda-forge
libopenvino-hetero-plugin 2024.4.0             h3f63f65_0    conda-forge
libopenvino-intel-cpu-plugin 2024.4.0             hac27bb2_0    conda-forge
libopenvino-intel-gpu-plugin 2024.4.0             hac27bb2_0    conda-forge
libopenvino-intel-npu-plugin 2024.4.0             hac27bb2_0    conda-forge
libopenvino-ir-frontend   2024.4.0             h3f63f65_0    conda-forge
libopenvino-onnx-frontend 2024.4.0             h56242b0_0    conda-forge
libopenvino-paddle-frontend 2024.4.0             h56242b0_0    conda-forge
libopenvino-pytorch-frontend 2024.4.0             h5888daf_0    conda-forge
libopenvino-tensorflow-frontend 2024.4.0             h358ae18_0    conda-forge
libopenvino-tensorflow-lite-frontend 2024.4.0             h5888daf_0    conda-forge
libopus                   1.3.1                h7f98852_1    conda-forge
libpciaccess              0.18                 hd590300_0    conda-forge
libpng                    1.6.43               h2797004_0    conda-forge
libprotobuf               4.25.3               h08a7969_0    conda-forge
libpython-static          3.10.14         h59595ed_0_cpython    conda-forge
libsolv                   0.7.30               h3509ff9_0    conda-forge
libsqlite                 3.46.0               hde9e2c9_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx                 14.1.0               hc0a3c3a_1    conda-forge
libstdcxx-ng              13.1.0               hfd8a6a1_0    conda-forge
libtasn1                  4.19.0               h166bdaf_0    conda-forge
libunistring              0.9.10               h7f98852_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libuv                     1.48.0               hd590300_0    conda-forge
libva                     2.22.0               hb711507_0    conda-forge
libvpx                    1.14.1               hac33072_0    conda-forge
libxcb                    1.16                 hb9d3cd8_1    conda-forge
libxml2                   2.12.7               he7c6b58_4    conda-forge
libzlib                   1.3.1                h4ab18f5_1    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
mamba                     2.0.2                hfdd0a45_0    conda-forge
markdown-it-py            3.0.0                    pypi_0    pypi
markupsafe                2.1.5                    pypi_0    pypi
mdurl                     0.1.2                    pypi_0    pypi
menuinst                  2.0.0           py310hff52083_1    conda-forge
mutagen                   1.46.0             pyhd8ed1ab_0    conda-forge
ncdu                      1.16                 h0f457ee_0    conda-forge
ncurses                   6.4                  h59595ed_2    conda-forge
nettle                    3.9.1                h7ab15ed_0    conda-forge
nlohmann_json             3.11.3               he02047a_1    conda-forge
nodejs                    22.7.0               hf235a45_0    conda-forge
nuitka                    2.2.3           py310hff52083_0    conda-forge
ocl-icd                   2.3.2                hd590300_1    conda-forge
openh264                  2.4.1                h59595ed_0    conda-forge
openssl                   3.3.2                hb9d3cd8_0    conda-forge
p11-kit                   0.24.1               hc5aa10d_0    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
pcre2                     10.44                hba22ea6_2    conda-forge
pip                       24.0                     pypi_0    pypi
pixman                    0.43.2               h59595ed_0    conda-forge
platformdirs              4.1.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.2.0              pyhd8ed1ab_0    conda-forge
psutil                    5.9.8                    pypi_0    pypi
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pugixml                   1.14                 h59595ed_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.4           py310h5764c6d_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pycryptodomex             3.18.0          py310h2372a71_0    conda-forge
pygments                  2.18.0                   pypi_0    pypi
pyopenssl                 23.2.0             pyhd8ed1ab_1    conda-forge
pyproject-hooks           1.1.0                    pypi_0    pypi
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.10.13         hd12c33a_0_cpython    conda-forge
python-dateutil           2.9.0.post0              pypi_0    pypi
python-slugify            8.0.4                    pypi_0    pypi
python_abi                3.10                    3_cp310    conda-forge
pyyaml                    6.0.1                    pypi_0    pypi
readline                  8.2                  h8228510_1    conda-forge
reproc                    14.2.4               h0b41bf4_0    conda-forge
reproc-cpp                14.2.4               hcb278e6_0    conda-forge
requests                  2.32.3             pyhd8ed1ab_0    conda-forge
rich                      13.7.1                   pypi_0    pypi
ruamel.yaml               0.17.32         py310h2372a71_0    conda-forge
ruamel.yaml.clib          0.2.7           py310h1fa729e_1    conda-forge
setuptools                68.0.0             pyhd8ed1ab_0    conda-forge
shtab                     1.6.4              pyhd8ed1ab_1    conda-forge
simdjson                  3.10.1               h84d6215_0    conda-forge
six                       1.16.0                   pypi_0    pypi
smmap                     5.0.1                    pypi_0    pypi
snappy                    1.2.1                ha2e4443_0    conda-forge
sourcery                  1.7.0                    pypi_0    pypi
spdlog                    1.14.1               hed91bc2_1    conda-forge
svt-av1                   2.2.1                h5888daf_0    conda-forge
tbb                       2021.13.0            h84d6215_0    conda-forge
termcolor                 2.3.0              pyhd8ed1ab_0    conda-forge
text-unidecode            1.3                      pypi_0    pypi
tk                        8.6.13          noxft_h4845f30_101    conda-forge
tldr                      3.3.0              pyh0aa0b10_0    conda-forge
tomli                     2.0.1                    pypi_0    pypi
tomli-w                   1.0.0                    pypi_0    pypi
toolz                     0.12.1             pyhd8ed1ab_0    conda-forge
tqdm                      4.65.0             pyhd8ed1ab_1    conda-forge
truststore                0.8.0              pyhd8ed1ab_0    conda-forge
types-python-dateutil     2.9.0.20240316           pypi_0    pypi
tzdata                    2023c                h71feb2d_0    conda-forge
urllib3                   2.0.3              pyhd8ed1ab_1    conda-forge
wayland                   1.23.1               h3e06ad9_0    conda-forge
wayland-protocols         1.36                 hd8ed1ab_0    conda-forge
websockets                12.0            py310h2372a71_0    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
x264                      1!164.3095           h166bdaf_2    conda-forge
x265                      3.5                  h924138e_3    conda-forge
xorg-fixesproto           5.0               h7f98852_1002    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.1.1                hd590300_0    conda-forge
xorg-libsm                1.2.4                h7391055_0    conda-forge
xorg-libx11               1.8.9                hb711507_1    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h0b41bf4_2    conda-forge
xorg-libxfixes            5.0.3             h7f98852_1004    conda-forge
xorg-libxrender           0.9.11               hd590300_0    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h0b41bf4_1003    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml-cpp                  0.8.0                h59595ed_0    conda-forge
yt-dlp                    2024.8.6           pyhd8ed1ab_0    conda-forge
zlib                      1.3.1                h4ab18f5_1    conda-forge
zstandard                 0.23.0          py310ha39cb0e_1    conda-forge
zstd                      1.5.6                ha6fb4c9_0    conda-forge

Additional Context

No response

jaimergp commented 10 hours ago

Hm, conda-libmamba-solver should have been repodata-patched to prevent this. Let me check if 23.11 also received the patch 🤔

jaimergp commented 10 hours ago

Yes, all repodata looks correct 🤔

$ conda repoquery search conda-libmamba-solver --json --platform linux-64 | grep libmambapy
          "libmambapy >=1.5.6,<2.0a0",
          "libmambapy >=1.5.6,<2.0a0"
          "libmambapy >=1.5.6,<2.0a0"
          "libmambapy >=1.5.6,<2.0a0"
          "libmambapy >=1.5.3,<2.0.0a0"
          "libmambapy >=1.5.3,<2.0.0a0"
          "libmambapy >=1.5.3,<2.0.0a0"
          "libmambapy >=1.5.1,<2.0.0a0"
          "libmambapy >=1.5.1,<2.0.0a0"
          "libmambapy >=1.5.1,<2.0.0a0"
          "libmambapy >=1.5.1,<2.0.0a0"
          "libmambapy >=1.4.1,<2.0.0a0",
          "libmambapy >=1.4.1,<2.0.0a0",
          "libmambapy >=1.4.1,<2.0.0a0",
          "libmambapy >=1.0.0,<2.0.0a0",
          "libmambapy >=1.0.0,<2.0.0a0",
          "libmambapy >=0.23,<2.0a0"
          "libmambapy >=0.23,<2.0a0"
          "libmambapy 0.22.*"
          "libmambapy 0.22.*"

What's the output of which mamba? After updating to v2 you shouldn't be hitting the conda code paths, because v2 is pure C++ 🤔

CsatiZoltan commented 10 hours ago

It's in the base environment: /home/zozo/mambaforge/bin/mamba.

jaimergp commented 10 hours ago

Is that a binary executable or a Python script?

CsatiZoltan commented 10 hours ago

A binary executable.

jaimergp commented 9 hours ago

The only thing I can think it's happening is that the environment is getting "reactivated" after the install, which somehow runs conda code. If you are using mamba primarily, you can ignore the conda-libmamba-solver warning. At some point we will release a version compatible with libmamba v2 too (before the year ends). If it gets reeeally annoying, I think you can set CONDA_NO_PLUGINS=1 or CONDA_SOLVER=classic and maybe that way the warning disappears? Let me know if that helped.

CsatiZoltan commented 9 hours ago

the environment is getting "reactivated" after the install

Probably true: when I open a new terminal, I get the same message. This is the time when the base environment is sourced.

If you are using mamba primarily, you can ignore the conda-libmamba-solver warning.

Yes, I use mamba. For curiosity, I ran the same command (update a certain package) with conda instead of mamba. The error/warning is the same, but this time it wants to install and update a lot of packages (which I refused). Given that both conda and mamba use the same channel (conda-forge), there must be a difference in the dependency solving. Could you point me to a resource why the dependency solving differs in mamba wrt conda? I thought that mamba is a faster and drop-in replacement for conda.

I think you can set CONDA_NO_PLUGINS=1 or CONDA_SOLVER=classic and maybe that way the warning disappears?

Exporting these variables in the same terminal before using the mamba/conda commands did not help in suppressing the message.

At some point we will release a version compatible with libmamba v2 too

OK, I can live with it, it is not too annoying. I propose that we keep this issue open until then.

jaimergp commented 9 hours ago

Could you point me to a resource why the dependency solving differs in mamba wrt conda?

This is a good start: https://conda.github.io/conda-libmamba-solver/user-guide/libmamba-vs-classic/ Then https://mamba.readthedocs.io/en/latest/advanced_usage/package_resolution.html.

Probably true: when I open a new terminal, I get the same message. This is the time when the base environment is sourced.

You might be able to get rid of the conda initialize block, and then run mamba init to populate the activation logic with only mamba instead. Maybe that works!

CsatiZoltan commented 9 hours ago

Thanks for the links. How should I use mamba init? It is not apparent for me from the help menus.