conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/miniforge
Other
6.43k stars 326 forks source link

BUG: ARM mambaforge breaks when updating mamba in x86 environment #346

Open corneliusroemer opened 2 years ago

corneliusroemer commented 2 years ago

Solution to issue cannot be found in the documentation.

Issue

I used the ARM mambaforge to install mamba on my apple silicon M1.

My base environment is hence in arm.

But to use nextstrain, I have an x86 environment, configured more or less as follows:

conda create -n nextstrain python
conda activate nextstrain
conda config --env --set subdir osx-64

I can't quite remember what exactly I did, but my thinking is that I updated mamba from the x86 directory, maybe through update --all.

In any case, I now can no longer run mamba. So I can't even export packages to reinstall mambaforge and get back to my latest state.

I've described the issue originally in the mamba repo but was told that they couldn't do much.

Maybe this is more of a miniforge issue than a mamba issue: https://github.com/mamba-org/mamba/issues/1897#issue-1360106036

In any case, does anyone know what I can do to rescue myself?

Maybe fat binaries of the mamba libraries would make it possible to use mamba in both x86 emulation and arm environments?

Error:

❯ mamba update --all              
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/mambaforge/base/bin/mamba", line 7, in <module>
    from mamba.mamba import main
  File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/mamba/mamba.py", line 49, in <module>
    import libmambapy as api
  File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/libmambapy/__init__.py", line 7, in <module>
    raise e
  File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/libmambapy/__init__.py", line 4, in <module>
    from libmambapy.bindings import *  # noqa: F401,F403
ImportError: dlopen(/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/libmambapy/bindings.cpython-310-darwin.so, 0x0002): Library not loaded: '@rpath/libsolv.1.dylib'
  Referenced from: '/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/libmambapy/bindings.cpython-310-darwin.so'
  Reason: tried: '/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/libmambapy/../../../libsolv.1.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))), '/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/libmambapy/../../../libsolv.1.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))), '/opt/homebrew/Caskroom/mambaforge/base/bin/../lib/libsolv.1.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))), '/opt/homebrew/Caskroom/mambaforge/base/bin/../lib/libsolv.1.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))), '/usr/local/lib/libsolv.1.dylib' (no such file), '/usr/lib/libsolv.1.dylib' (no such file)
❯ conda list
# packages in environment at /opt/homebrew/Caskroom/mambaforge/base/envs/nextstrain:
#
# Name                    Version                   Build  Channel
aioeasywebdav             2.4.0           py38h50d1736_1001    conda-forge
aiohttp                   3.8.1            py38hed1de0f_1    conda-forge
aiosignal                 1.2.0              pyhd8ed1ab_0    conda-forge
amply                     0.1.5              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
appnope                   0.1.3              pyhd8ed1ab_0    conda-forge
asttokens                 2.0.8              pyhd8ed1ab_0    conda-forge
async-timeout             4.0.2              pyhd8ed1ab_0    conda-forge
attmap                    0.13.2             pyhd8ed1ab_0    conda-forge
attrs                     22.1.0             pyh71513ae_1    conda-forge
augur                     17.1.0             pyhdfd78af_1    bioconda
auspice                   2.37.3               h9722bc1_0    file:///Users/corneliusromer/Downloads/OSXArtifacts/packages
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
backrefs                  5.2                pyhd8ed1ab_2    conda-forge
bcbio-gff                 0.6.9              pyh5e36f6f_0    bioconda
bcrypt                    3.2.2            py38h0dd4459_0    conda-forge
biopython                 1.74             py38h0b31af3_0    conda-forge
black                     22.6.0           py38h50d1736_2    conda-forge
boost-cpp                 1.74.0               h8b082ac_8    conda-forge
boto3                     1.24.62            pyhd8ed1ab_0    conda-forge
botocore                  1.27.63            pyhd8ed1ab_0    conda-forge
bracex                    2.2.1              pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                h5eb16cf_7    conda-forge
brotli-bin                1.0.9                h5eb16cf_7    conda-forge
brotlipy                  0.7.0           py38hed1de0f_1004    conda-forge
bx-python                 0.9.0            py38h27f87a4_0    bioconda
bzip2                     1.0.8                h0d85af4_4    conda-forge
c-ares                    1.18.1               h0d85af4_0    conda-forge
ca-certificates           2022.6.15            h033912b_0    conda-forge
cachetools                5.2.0              pyhd8ed1ab_0    conda-forge
certifi                   2022.6.15          pyhd8ed1ab_1    conda-forge
cffi                      1.15.1           py38h86886aa_0    conda-forge
charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
click                     8.1.3            py38h50d1736_0    conda-forge
coin-or-cbc               2.10.8               hc8a182d_0    conda-forge
coin-or-cgl               0.60.6               hd1832e5_1    conda-forge
coin-or-clp               1.17.7               h947a6f2_1    conda-forge
coin-or-osi               0.108.7              h263dbfc_1    conda-forge
coin-or-utils             2.11.6               h4a88296_1    conda-forge
coincbc                   2.10.8            0_metapackage    conda-forge
colorama                  0.4.5              pyhd8ed1ab_0    conda-forge
commonmark                0.9.1                      py_0    conda-forge
configargparse            1.5.3              pyhd8ed1ab_0    conda-forge
connection_pool           0.0.3              pyhd3deb0d_0    conda-forge
constellations            0.1.10             pyh5e36f6f_0    bioconda
cryptography              37.0.4           py38h0f8513e_0    conda-forge
csv-diff                  1.1                      pypi_0    pypi
curl                      7.83.1               h372c54d_0    conda-forge
cvxopt                    1.3.0            py38h102f16f_1    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
dataclasses               0.8                pyhc8e2a94_3    conda-forge
datrie                    0.8.2            py38h96a0964_3    conda-forge
debugpy                   1.6.3            py38hd331d03_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
dictdiffer                0.9.0                    pypi_0    pypi
docutils                  0.19             py38h50d1736_0    conda-forge
dpath                     2.0.6            py38h50d1736_1    conda-forge
dropbox                   11.33.0            pyhd8ed1ab_0    conda-forge
dsdp                      5.8               h6e329d1_1203    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
epiweeks                  2.1.4              pyhdfd78af_0    bioconda
executing                 1.0.0              pyhd8ed1ab_0    conda-forge
expat                     2.4.8                h96cf925_0    conda-forge
fasteners                 0.17.3             pyhd8ed1ab_0    conda-forge
fasttree                  2.1.11               hdcdfbac_1    bioconda
fftw                      3.3.10          nompi_h6e8bf23_103    conda-forge
filechunkio               1.8                        py_2    conda-forge
filelock                  3.8.0              pyhd8ed1ab_0    conda-forge
fonttools                 4.37.1           py38hef030d1_0    conda-forge
freetype                  2.12.1               h3f81eb7_0    conda-forge
frozenlist                1.3.1            py38h35d34b1_0    conda-forge
fsspec                    2022.7.1           pyhd8ed1ab_0    conda-forge
ftputil                   5.0.4              pyhd8ed1ab_0    conda-forge
future                    0.18.2           py38h50d1736_5    conda-forge
gettext                   0.19.8.1          hd1a6beb_1008    conda-forge
giflib                    5.2.1                hbcb3906_2    conda-forge
git                       2.37.3          pl5321hd164d3d_0    conda-forge
gitdb                     4.0.9              pyhd8ed1ab_0    conda-forge
gitpython                 3.1.27             pyhd8ed1ab_0    conda-forge
glpk                      4.65              h0f52abe_1004    conda-forge
gmp                       6.2.1                h2e338ed_0    conda-forge
gofasta                   1.1.0                h527b516_0    bioconda
google-api-core           2.8.2              pyhd8ed1ab_0    conda-forge
google-api-python-client  2.58.0             pyhd8ed1ab_0    conda-forge
google-auth               2.11.0             pyh6c4a22f_0    conda-forge
google-auth-httplib2      0.1.0              pyhd8ed1ab_1    conda-forge
google-cloud-core         2.3.2              pyhd8ed1ab_0    conda-forge
google-cloud-storage      2.5.0              pyh6c4a22f_0    conda-forge
google-crc32c             1.1.2            py38h5f3b482_3    conda-forge
google-resumable-media    2.3.3              pyhd8ed1ab_0    conda-forge
googleapis-common-protos  1.56.4           py38h50d1736_0    conda-forge
grpcio                    1.46.3           py38hf25cc3e_0    conda-forge
gsl                       2.7                  h93259b0_0    conda-forge
httplib2                  0.20.4             pyhd8ed1ab_0    conda-forge
icu                       70.1                 h96cf925_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
importlib-metadata        1.7.0              pyhd8ed1ab_1    conda-forge
importlib_metadata        1.7.0                hd8ed1ab_1    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
ipykernel                 6.15.2             pyh736e0ef_0    conda-forge
ipython                   8.4.0              pyhd1c38e8_1    conda-forge
iqtree                    2.2.0.3              h135ad0d_0    bioconda
isa-l                     2.30.0               h0d85af4_4    conda-forge
isodate                   0.6.1              pyhd8ed1ab_0    conda-forge
jedi                      0.18.1             pyhd8ed1ab_2    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
jmespath                  1.0.1              pyhd8ed1ab_0    conda-forge
joblib                    1.1.0              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   hac89ed1_2    conda-forge
jsonschema                3.2.0              pyhd8ed1ab_3    conda-forge
jupyter_client            7.3.5              pyhd8ed1ab_0    conda-forge
jupyter_core              4.11.1           py38h50d1736_0    conda-forge
k8                        0.2.5                h6151dfb_2    bioconda
kiwisolver                1.4.4            py38hf58141a_0    conda-forge
krb5                      1.19.3               hb49756b_0    conda-forge
lcms2                     2.12                 h577c468_0    conda-forge
lerc                      3.0                  he49afe7_0    conda-forge
libblas                   3.9.0           16_osx64_openblas    conda-forge
libbrotlicommon           1.0.9                h5eb16cf_7    conda-forge
libbrotlidec              1.0.9                h5eb16cf_7    conda-forge
libbrotlienc              1.0.9                h5eb16cf_7    conda-forge
libcblas                  3.9.0           16_osx64_openblas    conda-forge
libcbor                   0.9.0                he49afe7_0    conda-forge
libcrc32c                 1.1.2                he49afe7_0    conda-forge
libcurl                   7.83.1               h372c54d_0    conda-forge
libcxx                    14.0.6               hce7ea42_0    conda-forge
libdeflate                1.10                 h0d85af4_0    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 haf1e3a3_1    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libfido2                  1.11.0               h875bebe_0    conda-forge
libgfortran               5.0.0           10_4_0_h97931a8_25    conda-forge
libgfortran5              11.3.0              h082f757_25    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
liblapack                 3.9.0           16_osx64_openblas    conda-forge
liblapacke                3.9.0           16_osx64_openblas    conda-forge
libnghttp2                1.47.0               h7cbc4dc_1    conda-forge
libopenblas               0.3.21          openmp_h947e540_2    conda-forge
libpng                    1.6.37               h5481273_4    conda-forge
libprotobuf               3.18.1               hcf210ce_0    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libsqlite                 3.39.2               h5a3d3bf_1    conda-forge
libssh2                   1.10.0               h7535e13_3    conda-forge
libtiff                   4.4.0                hfca7e8f_0    conda-forge
libuuid                   2.32.1            h35c211d_1000    conda-forge
libuv                     1.44.2               hac89ed1_0    conda-forge
libwebp                   1.2.4                hfa4350a_0    conda-forge
libwebp-base              1.2.4                h775f41a_0    conda-forge
libxcb                    1.13              h0d85af4_1004    conda-forge
libzlib                   1.2.12               hfe4f2af_2    conda-forge
llist                     0.7.1            py38h8b7791e_2    conda-forge
llvm-openmp               14.0.4               ha654fa7_0    conda-forge
logmuse                   0.2.6              pyh8c360ce_0    conda-forge
lz4-c                     1.9.3                he49afe7_1    conda-forge
lzo                       2.10              haf1e3a3_1000    conda-forge
mafft                     7.505                ha5712d3_0    bioconda
markupsafe                2.1.1            py38hed1de0f_1    conda-forge
matplotlib-base           3.5.3            py38hae485fc_2    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
metis                     5.1.0             h2e338ed_1006    conda-forge
minimap2                  2.24                 h1f540d2_1    bioconda
mpfr                      4.1.0                h0f52abe_1    conda-forge
mpi                       1.0                     openmpi    conda-forge
multidict                 6.0.2            py38hed1de0f_1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mypy_extensions           0.4.3            py38h50d1736_5    conda-forge
mysql-connector-c         6.1.11            h0f02589_1007    conda-forge
nbformat                  5.4.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  h96cf925_1    conda-forge
nest-asyncio              1.5.5              pyhd8ed1ab_0    conda-forge
networkx                  2.8.6              pyhd8ed1ab_0    conda-forge
nextalign                 2.5.0                h527b516_0    bioconda
nextclade                 2.5.0                h527b516_0    bioconda
nextstrain-cli            4.2.0              pyhdfd78af_1    bioconda
nodejs                    18.8.0               h3591b89_0    conda-forge
numpy                     1.23.2           py38h84cd246_0    conda-forge
oauth2client              4.1.3                      py_0    conda-forge
openjpeg                  2.5.0                h5d0d7b0_1    conda-forge
openmpi                   4.1.2                hd3cd54c_0    conda-forge
openssh                   9.0p1                hd27dfd1_0    conda-forge
openssl                   1.1.1q               hfe4f2af_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.4.3            py38h2b30649_0    conda-forge
pango-aliasor             0.1.4                    pypi_0    pypi
pango-designation         1.14               pyhdfd78af_0    bioconda
pangolearn                2022-07-09               pypi_0    pypi
pangolin                  3.1.11             pyhdfd78af_2    bioconda
paramiko                  2.11.0             pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pathspec                  0.10.0             pyhd8ed1ab_0    conda-forge
pbzip2                    1.1.13               h9d27c22_1    conda-forge
pcre2                     10.37                h3f55489_1    conda-forge
peppy                     0.35.0             pyhd8ed1ab_0    conda-forge
perl                      5.32.1          2_h0d85af4_perl5    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pigz                      2.6                  h5dbffcc_0    conda-forge
pillow                    9.2.0            py38h7bff4d5_2    conda-forge
pip                       22.2.2             pyhd8ed1ab_0    conda-forge
plac                      1.3.5              pyhd8ed1ab_0    conda-forge
platformdirs              2.5.2              pyhd8ed1ab_1    conda-forge
pluggy                    1.0.0            py38h50d1736_3    conda-forge
ply                       3.11                       py_1    conda-forge
prettytable               3.4.0              pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.30             pyha770c72_0    conda-forge
protobuf                  3.18.1           py38ha048514_0    conda-forge
psutil                    5.9.1            py38h0dd4459_0    conda-forge
pthread-stubs             0.4               hc929b4f_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pulp                      2.6.0            py38h50d1736_1    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
py                        1.11.0             pyh6c4a22f_0    conda-forge
pyasn1                    0.4.8                      py_0    conda-forge
pyasn1-modules            0.2.7                      py_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.13.0             pyhd8ed1ab_0    conda-forge
pyjwt                     2.4.0              pyhd8ed1ab_0    conda-forge
pynacl                    1.5.0            py38hed1de0f_1    conda-forge
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1           py38hed1de0f_1    conda-forge
pysam                     0.19.1           py38h186c2b7_0    bioconda
pysftp                    0.2.9                      py_1    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
pytest                    7.1.2            py38h50d1736_0    conda-forge
python                    3.8.13          h394c593_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.16.1             pyhd8ed1ab_0    conda-forge
python-irodsclient        1.1.4              pyhd8ed1ab_0    conda-forge
python-isal               1.0.1            py38h35d34b1_0    conda-forge
python-lzo                1.14             py38h287d1ae_1    conda-forge
python_abi                3.8                      2_cp38    conda-forge
pytz                      2022.2.1           pyhd8ed1ab_0    conda-forge
pyu2f                     0.1.5              pyhd8ed1ab_0    conda-forge
pyyaml                    6.0              py38hed1de0f_4    conda-forge
pyzmq                     23.2.1           py38hde384ec_0    conda-forge
ratelimiter               1.2.0                   py_1002    conda-forge
raxml                     8.2.12               ha5712d3_4    bioconda
readline                  8.1.2                h3899abd_0    conda-forge
requests                  2.28.1             pyhd8ed1ab_1    conda-forge
retry                     0.9.2                      py_0    conda-forge
rich                      12.5.1             pyhd8ed1ab_0    conda-forge
rsa                       4.9                pyhd8ed1ab_0    conda-forge
s3fs                      0.4.2                      py_0    conda-forge
s3transfer                0.6.0              pyhd8ed1ab_0    conda-forge
scikit-learn              0.23.1           py38hb7f0800_0    conda-forge
scipy                     1.9.1            py38hb5a21b1_0    conda-forge
scorpio                   0.3.17             pyhdfd78af_0    bioconda
seqkit                    2.3.0                h527b516_0    bioconda
setuptools                65.3.0             pyhd8ed1ab_1    conda-forge
shellingham               1.5.0              pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
slacker                   0.14.0                     py_0    conda-forge
smart_open                6.1.0              pyha770c72_1    conda-forge
smmap                     3.0.5              pyh44b312d_0    conda-forge
snakefmt                  0.6.1              pyhdfd78af_0    bioconda
snakemake                 7.14.0               hdfd78af_0    bioconda
snakemake-minimal         7.14.0             pyhdfd78af_0    bioconda
sqlite                    3.39.2               hd9f0692_1    conda-forge
stack_data                0.5.0              pyhd8ed1ab_0    conda-forge
stone                     3.3.1              pyhd8ed1ab_0    conda-forge
stopit                    1.1.2                      py_0    conda-forge
suitesparse               5.10.1               h7aff33d_1    conda-forge
tabulate                  0.8.10             pyhd8ed1ab_0    conda-forge
tbb                       2021.5.0             hbb4e6a2_1    conda-forge
threadpoolctl             3.1.0              pyh8a188c0_0    conda-forge
tk                        8.6.12               h5dbffcc_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
toposort                  1.7                pyhd8ed1ab_0    conda-forge
tornado                   6.2              py38h0dd4459_0    conda-forge
traitlets                 5.3.0              pyhd8ed1ab_0    conda-forge
treetime                  0.9.2              pyh5e36f6f_0    bioconda
tsv-utils                 2.2.0                h527b516_0    bioconda
typer                     0.6.1              pyhd8ed1ab_0    conda-forge
typing-extensions         4.3.0                hd8ed1ab_0    conda-forge
typing_extensions         4.3.0              pyha770c72_0    conda-forge
ubiquerg                  0.6.2              pyhd8ed1ab_0    conda-forge
ucsc-fatovcf              426                  ha55e18d_0    bioconda
unicodedata2              14.0.0           py38hed1de0f_1    conda-forge
uritemplate               4.1.1              pyhd8ed1ab_0    conda-forge
urllib3                   1.26.11            pyhd8ed1ab_0    conda-forge
usher                     0.5.6                h289ebe5_0    bioconda
vcftools                  0.1.16          pl5321h6151dfb_7    bioconda
veracitools               0.1.3                      py_0    conda-forge
wcmatch                   8.3                pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
wrapt                     1.14.1           py38h0dd4459_0    conda-forge
xopen                     1.6.0            py38h50d1736_0    conda-forge
xorg-libxau               1.0.9                h35c211d_0    conda-forge
xorg-libxdmcp             1.1.3                h35c211d_0    conda-forge
xz                        5.2.6                h775f41a_0    conda-forge
yaml                      0.2.5                h0d85af4_2    conda-forge
yarl                      1.7.2            py38hed1de0f_2    conda-forge
yte                       1.5.1            py38h50d1736_0    conda-forge
zeromq                    4.3.4                he49afe7_1    conda-forge
zipp                      3.8.1              pyhd8ed1ab_0    conda-forge
zlib                      1.2.12               hfe4f2af_2    conda-forge
zstd                      1.5.2                hfa58983_4    conda-forge
❯ conda info    

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/conda/exceptions.py", line 1125, in __call__
        return func(*args, **kwargs)
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/conda/cli/main.py", line 86, in main_subshell
        exit_code = do_call(args, p)
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 93, in do_call
        return getattr(module, func_name)(args, parser)
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/conda/cli/main_info.py", line 317, in execute
        info_dict = get_info_dict(args.system)
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/conda/cli/main_info.py", line 135, in get_info_dict
        _supplement_index_with_system(virtual_pkg_index)
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/conda/core/index.py", line 168, in _supplement_index_with_system
        cuda_version = context.cuda_version
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/conda/auxlib/decorators.py", line 276, in new_fget
        cache[inner_attname] = func(self)
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/conda/common/decorators.py", line 24, in wrapper
        return func(*args, **kwargs)
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/conda/base/context.py", line 931, in cuda_version
        return cuda_detect()
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/site-packages/conda/common/cuda.py", line 38, in cuda_detect
        import ctypes
      File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/ctypes/__init__.py", line 8, in <module>
        from _ctypes import Union, Structure, Array
    ImportError: dlopen(/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/lib-dynload/_ctypes.cpython-310-darwin.so, 0x0002): Library not loaded: '@rpath/libffi.8.dylib'
      Referenced from: '/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/lib-dynload/_ctypes.cpython-310-darwin.so'
      Reason: tried: '/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/lib-dynload/../../libffi.8.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))), '/opt/homebrew/Caskroom/mambaforge/base/lib/python3.10/lib-dynload/../../libffi.8.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))), '/opt/homebrew/Caskroom/mambaforge/base/bin/../lib/libffi.8.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))), '/opt/homebrew/Caskroom/mambaforge/base/bin/../lib/libffi.8.dylib' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))), '/usr/local/lib/libffi.8.dylib' (no such file), '/usr/lib/libffi.8.dylib' (no such file)

`$ /opt/homebrew/Caskroom/mambaforge/base/bin/conda info`

An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?
isuruf commented 2 years ago

You can do a separate installation of mambaforge using

curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-$(uname)-$(uname -m).sh

and then use that conda/mamba to repair the old installation by doing conda install libffi libsolv --force-reinstall -p /opt/homebrew/Caskroom/mambaforge/base/

corneliusroemer commented 2 years ago

Thanks @isuruf - that's helpful but it doesn't seem to work.

Something is confused about architectures and I have no clue to fix.

After doing a separate installation of mambaforge, I had to first figure out how to deactivate the base environment:

./mambaforge/bin/conda config --set auto_activate_base false 
conda deactivate

Otherwise the broken environment would still be active:


Looking for: ['libffi', 'libsolv']

pkgs/main/osx-64                                     4.5MB @   3.2MB/s  1.5s
bioconda/noarch                                      3.7MB @   2.4MB/s  1.7s
bioconda/osx-64                                      3.5MB @   2.1MB/s  1.8s
pkgs/r/noarch                                        1.3MB @ 715.4kB/s  0.4s
pkgs/main/noarch                                   816.0kB @ 396.0kB/s  0.5s
pkgs/r/osx-64                                      820.9kB @ 392.9kB/s  0.4s
conda-forge/noarch                                   9.3MB @   3.2MB/s  3.2s
conda-forge/osx-64                                  23.1MB @   2.7MB/s  9.3s
error    libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.
error    libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.

Pinned packages:
  - python 3.10.*

It doesn't want to work so I'm installing miniforge now, hoping that conda remains as a fallback in case mamba breaks again.

Something's very broken about architecture resolution.