mamba: AttributeError: module 'libmambapy' has no attribute 'QueryFormat'
I just installed mamba in an existing miniconda base environment (created a while ago) and tried to use it to create a new environment, but I get the following error. Some googling didn’t turn up previous reports so far.
I’m on Windows 10 (21H1 build 19043.1415).
Tried with mamba 0.19.1 (the one that got installed after conda install mamba -c conda-forge), then tried downgrading to 0.18.1 since that one is the last release according to the GitHub project.
(base) PS D:\Zertrin\xxxx\xxxx\xxxx\xxxx> mamba env create -n mambatest
Traceback (most recent call last):
File "C:\Users\Zertrin\Miniconda3\Scripts\mamba-script.py", line 6, in <module>
from mamba.mamba import main
File "C:\Users\Zertrin\Miniconda3\lib\site-packages\mamba\mamba.py", line 50, in <module>
from mamba import repoquery as repoquery_api
File "C:\Users\Zertrin\Miniconda3\lib\site-packages\mamba\repoquery.py", line 12, in <module>
def _repoquery(query_type, q, pool, fmt=api.QueryFormat.JSON):
AttributeError: module 'libmambapy' has no attribute 'QueryFormat'
Here is the content of the base environment so far:
(base) PS D:\Zertrin\xxxx\xxxx\xxxx\xxxx> conda list
# packages in environment at C:\Users\Zertrin\Miniconda3:
#
# Name Version Build Channel
brotlipy 0.7.0 py37hcc03f2d_1003 conda-forge
bzip2 1.0.8 h8ffe710_4 conda-forge
ca-certificates 2021.10.8 h5b45459_0 conda-forge
certifi 2021.10.8 py37h03978a9_1 conda-forge
cffi 1.15.0 py37hd8e9650_0 conda-forge
charset-normalizer 2.0.9 pyhd8ed1ab_0 conda-forge
colorama 0.4.4 pyh9f0ad1d_0 conda-forge
conda 4.11.0 py37h03978a9_0 conda-forge
conda-package-handling 1.7.3 py37ha54c9ec_1 conda-forge
console_shortcut 0.1.1 3
cryptography 36.0.1 py37h65266a2_0 conda-forge
flake8 3.6.0 py37_0
idna 3.1 pyhd3deb0d_0 conda-forge
krb5 1.19.2 h20d022d_3 conda-forge
libarchive 3.5.2 hb45042f_1 conda-forge
libcurl 7.80.0 h789b8ee_1 conda-forge
libiconv 1.16 he774522_0 conda-forge
libmamba 0.19.1 h44daa3b_0 conda-forge
libmambapy 0.19.1 py37ha07342c_0 conda-forge
libsolv 0.7.19 h7755175_5 conda-forge
libssh2 1.10.0 h680486a_2 conda-forge
libxml2 2.9.12 hf5bbc77_1 conda-forge
libzlib 1.2.11 h8ffe710_1013 conda-forge
lz4-c 1.9.3 h8ffe710_1 conda-forge
lzo 2.10 he774522_1000 conda-forge
mamba 0.19.1 py37h13f6ddf_0 conda-forge
mccabe 0.6.1 py_1 conda-forge
menuinst 1.4.18 py37h03978a9_1 conda-forge
openssl 1.1.1l h8ffe710_0 conda-forge
pip 21.3.1 pyhd8ed1ab_0 conda-forge
pybind11-abi 4 hd8ed1ab_3 conda-forge
pycodestyle 2.4.0 py37_0
pycosat 0.6.3 py37hcc03f2d_1009 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pyflakes 2.0.0 py37_0
pyopenssl 21.0.0 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 py37h03978a9_4 conda-forge
python 3.7.1 h9460c21_1003 conda-forge
python_abi 3.7 2_cp37m conda-forge
pywin32 303 py37hcc03f2d_0 conda-forge
reproc 14.2.3 h8ffe710_0 conda-forge
reproc-cpp 14.2.3 h0e60522_0 conda-forge
requests 2.26.0 pyhd8ed1ab_1 conda-forge
ruamel_yaml 0.15.80 py37hcc03f2d_1006 conda-forge
setuptools 60.2.0 py37h03978a9_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
tk 8.6.11 h8ffe710_1 conda-forge
tqdm 4.62.3 pyhd8ed1ab_0 conda-forge
ucrt 10.0.20348.0 h57928b3_0 conda-forge
urllib3 1.26.7 pyhd8ed1ab_0 conda-forge
vc 14.2 hb210afc_5 conda-forge
vs2015_runtime 14.29.30037 h902a5da_5 conda-forge
wheel 0.37.1 pyhd8ed1ab_0 conda-forge
win_inet_pton 1.1.0 py37h03978a9_3 conda-forge
xz 5.2.5 h62dcd97_1 conda-forge
yaml 0.2.5 h8ffe710_2 conda-forge
yaml-cpp 0.6.3 ha925a31_4 conda-forge
zlib 1.2.11 h8ffe710_1013 conda-forge
zstd 1.5.1 h6255e5f_0 conda-forge
Any idea?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 18 (6 by maintainers)
I’ve found what was causing the issue for me. Maybe someone will make use of it. So I was installing mamba from conda-forge channel using command:
conda install -n base -c conda-forge mamba, but on the other hand, I had a script for updating conda environment usingmamba update --all, but it was using the default channel and after that, mamba became corrupted withAttributeError: module 'libmambapy' has no attribute 'QueryFormat'. Changing update command tomamba update -c conda-forge -allfixed the issue.