Closed zscooper closed 10 months ago
Hey @zscooper ,
I'm wondering if you ran the following command after getting the mamba
error, just to be sure.
ln -s ${CONDA_PREFIX}/lib/libarchive.19.dylib \
${CONDA_PREFIX}/lib/libarchive.13.dylib
If not, please run that command and try to install with mamba again.
Hey @metehaansever, yes I ran this command. Running mamba
still gives me this error:
mamba
Traceback (most recent call last):
File "/Users/zaccooper/miniconda3/envs/anvio-8/bin/mamba", line 7, in <module>
from mamba.mamba import main
File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/mamba/mamba.py", line 49, in <module>
import libmambapy as api
File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/libmambapy/__init__.py", line 7, in <module>
raise e
File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/libmambapy/__init__.py", line 4, in <module>
from libmambapy.bindings import * # noqa: F401,F403
ImportError: dlopen(/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/libmambapy/bindings.cpython-310-darwin.so, 0x0002): Symbol not found: _lzma_cputhreads
Referenced from: <4CCF0E12-BE2F-3524-A150-7F05B7189353> /Users/zaccooper/miniconda3/envs/anvio-8/lib/libarchive.13.dylib
Expected in: <77FF8999-1AB6-326B-90EE-F96C63299803> /usr/lib/liblzma.5.dylib
I think this error is related to libarchive
. We can check whether there is libarchive
in our conda list with the following command.
conda list
If you cannot see the libarchive
package in this list, we can try to install libarchive
with Conda.
conda install libarchive -n base -c conda-forge
Then test to make sure that mamba is okay now:
mamba
And I believe this issue may help.
I tried a few things, but I'm still having the same issue with mamba not working (new error). I removed the original (in case I messed something up) and then created a new anvio-8 env. In the base env, I made sure conda and all packages were updated. I made sure to use the conda-forge version of packages as well. This is the output from the first mamba
test in the tutorial (https://anvio.org/install/macos/stable/), after having run the additional libarchive command you suggested above:
mamba
/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/conda_package_streaming/package_streaming.py:25: UserWarning: zstandard could not be imported. Running without .conda support.
warnings.warn("zstandard could not be imported. Running without .conda support.")
/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/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")
Traceback (most recent call last):
File "/Users/zaccooper/miniconda3/envs/anvio-8/bin/mamba", line 7, in <module>
from mamba.mamba import main
File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/mamba/mamba.py", line 49, in <module>
import libmambapy as api
File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/libmambapy/__init__.py", line 7, in <module>
raise e
File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/libmambapy/__init__.py", line 4, in <module>
from libmambapy.bindings import * # noqa: F401,F403
ImportError: dlopen(/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/libmambapy/bindings.cpython-310-darwin.so, 0x0002): tried: '/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/libmambapy/bindings.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/libmambapy/bindings.cpython-310-darwin.so' (no such file), '/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/libmambapy/bindings.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
Here is the conda list
:
conda list
# packages in environment at /Users/zaccooper/miniconda3/envs/anvio-8:
#
# Name Version Build Channel
boltons 23.0.0 pyhd8ed1ab_0 conda-forge
brotli-python 1.1.0 py310h9e9d8ca_1 conda-forge
bzip2 1.0.8 h0d85af4_4 conda-forge
c-ares 1.20.1 h10d778d_0 conda-forge
ca-certificates 2023.7.22 h8857fd0_0 conda-forge
certifi 2023.7.22 pyhd8ed1ab_0 conda-forge
cffi 1.16.0 py310hdca579f_0 conda-forge
charset-normalizer 3.3.0 pyhd8ed1ab_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
conda 23.7.4 py310h2ec42d9_0 conda-forge
conda-package-handling 2.2.0 pyh38be061_0 conda-forge
conda-package-streaming 0.9.0 pyhd8ed1ab_0 conda-forge
cryptography 41.0.4 py310ha1817de_0 conda-forge
fmt 10.1.1 h1c7c39f_0 conda-forge
icu 73.2 hf5e326d_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
jsonpatch 1.33 pyhd8ed1ab_0 conda-forge
jsonpointer 2.4 py310h2ec42d9_3 conda-forge
krb5 1.21.2 hb884880_0 conda-forge
libarchive 3.7.2 h0b5dc4a_0 conda-forge
libcurl 8.3.0 h5f667d7_0 conda-forge
libcxx 16.0.6 hd57cbcb_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
libiconv 1.17 hac89ed1_0 conda-forge
libmamba 1.5.1 h08141de_1 conda-forge
libmambapy 1.5.1 py310he70b7dd_1 conda-forge
libnghttp2 1.52.0 he2ab024_0 conda-forge
libsolv 0.7.25 h7d26f99_0 conda-forge
libsqlite 3.43.0 h58db7d2_0 conda-forge
libssh2 1.11.0 hd019ec5_0 conda-forge
libxml2 2.11.5 h3346baf_1 conda-forge
libzlib 1.2.13 h8a1eda9_5 conda-forge
lz4-c 1.9.4 hf0c8a7f_0 conda-forge
lzo 2.10 haf1e3a3_1000 conda-forge
mamba 1.5.1 py310h6bde348_1 conda-forge
ncurses 6.4 hf0c8a7f_0 conda-forge
openssl 3.1.3 h8a1eda9_0 conda-forge
packaging 23.2 pyhd8ed1ab_0 conda-forge
pip 23.2.1 pyhd8ed1ab_0 conda-forge
pluggy 1.3.0 pyhd8ed1ab_0 conda-forge
pybind11-abi 4 hd8ed1ab_3 conda-forge
pycosat 0.6.6 py310h6729b98_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pyopenssl 23.2.0 pyhd8ed1ab_1 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.10.13 hb885b13_0
python_abi 3.10 2_cp310 conda-forge
readline 8.2 h9e318b2_1 conda-forge
reproc 14.2.4.post0 h0dc2134_0 conda-forge
reproc-cpp 14.2.4.post0 he965462_0 conda-forge
requests 2.31.0 pyhd8ed1ab_0 conda-forge
ruamel.yaml 0.17.35 py310h6729b98_0 conda-forge
ruamel.yaml.clib 0.2.7 py310h6729b98_2 conda-forge
setuptools 68.2.2 pyhd8ed1ab_0 conda-forge
sqlite 3.43.0 h2b0dec6_0 conda-forge
tk 8.6.13 hef22860_0 conda-forge
toolz 0.12.0 pyhd8ed1ab_0 conda-forge
tqdm 4.66.1 pyhd8ed1ab_0 conda-forge
tzdata 2023c h71feb2d_0 conda-forge
urllib3 2.0.6 pyhd8ed1ab_0 conda-forge
wheel 0.41.2 pyhd8ed1ab_0 conda-forge
xz 5.4.2 h80987f9_0
yaml-cpp 0.8.0 he965462_0 conda-forge
zlib 1.2.13 h8a1eda9_5 conda-forge
zstandard 0.21.0 py310h151724a_1 conda-forge
zstd 1.5.5 h829000d_0 conda-forge
Okay, I think I fixed it. I got the rest to install properly. I installed the block of dependencies (except fastani) using conda. I still can't get mamba
to work on its own, but I ran conda update mamba
. After this, mamba
alone still doesn't work, but the pip install
of anvi'o worked without errors, and the self-test executed correctly.
I just wanted to add to this thread because I ran into this same issue on my M2 Mac. I was getting the Library not loaded: @rpath/libffi.8.dylib
erro with the snakemake package because the libffi
package had the wrong architecture on my computer. Installing this package with conda converted the architecture and enabled the installation to finish (though I also could not use mamba
and installed with the regular conda install
command instead). But later, during the self-test, I got a few more similar incompatible architecture (have 'arm64', need 'x86_64')
errors with different libraries.
I am guessing that these architecture-related errors started coming up because the command to make bioconda packages work on M1/M2 Macs (ie, conda config --env --set subdir osx-64
) changes the expected architecture of packages within the currently active environment. The affected libraries on my computer must have somehow been installed before the configuration change, leading to the incompatibility.
But I managed to solve it by re-installing each package with conda within the anvio-8 environment (to change their architecture). This required re-running the self-test a few times to determine which packages were affected and required reinstallation. Ultimately, my solution required the following commands:
# error thrown during pip install
conda install libffi
# errors thrown during anvi-self-test
conda install readline
conda install ncurses
UPDATE: I realized later while installing anvio-dev that the conda config
command is meant to be run before creating the environment, not after activating it (as the text in our v8 instructions said). When you set the configuration before creating the env, the installation instructions work as written. I have updated our stable version instructions to indicate the correct order of doing things.
Short description of the problem
Fresh install of Anvi'o v8 on M2 Mac, fastani not compatible with python 3.10 (OK), pip install failing after collecting snakemake.
anvi'o version
v8 - not yet installed
System info
MacOS Ventura 13.6, M2 Pro
Installing in conda environment (python version=3.10, as specified in tutorial)
Detailed description of the issue
Trying to do a fresh install of Anvio v8 on a new computer with M2 Pro chipset. Mamba isn't installing correctly, that's okay conda is fast enough. FastANI didn't install because of python version incompatibility (that's okay for now). Getting to the pip install, everything runs smoothly until pip tries to install snakemake (error message posted below). I tried to do a separate install of snakemake
conda install -c bioconda snakemake
but ran into a python version incompatibility error:Is there a way to resolve this pip install issue?
Files / commands to reproduce the issue