merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
423 stars 144 forks source link

[BUG] Anvio v8 install python version errors - snakemake, fastani #2141

Closed zscooper closed 10 months ago

zscooper commented 10 months ago

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:

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - snakemake -> python[version='3.4.*|3.5.*|3.6.*|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0']

Your python: python=3.10

Is there a way to resolve this pip install issue?

Files / commands to reproduce the issue

pip install anvio-8.tar.gz
Processing ./anvio-8.tar.gz
  Preparing metadata (setup.py) ... done
Collecting numpy<=1.24 (from anvio==8)
  Using cached numpy-1.24.0-cp310-cp310-macosx_10_9_x86_64.whl (19.8 MB)
Collecting scipy (from anvio==8)
  Obtaining dependency information for scipy from https://files.pythonhosted.org/packages/6d/bc/6f79da3a8edf5f432ccdc49fd35e8b4fe2ce1d4ad3b5360c742101a57838/scipy-1.11.3-cp310-cp310-macosx_10_9_x86_64.whl.metadata
  Using cached scipy-1.11.3-cp310-cp310-macosx_10_9_x86_64.whl.metadata (60 kB)
Collecting bottle (from anvio==8)
  Using cached bottle-0.12.25-py3-none-any.whl (90 kB)
Collecting pysam (from anvio==8)
  Obtaining dependency information for pysam from https://files.pythonhosted.org/packages/70/41/34c85c7f2f3ec59c587ac8081b7e3f0e0ff320751c8bc659e6bc61bed6c6/pysam-0.22.0-cp310-cp310-macosx_10_9_x86_64.whl.metadata
  Using cached pysam-0.22.0-cp310-cp310-macosx_10_9_x86_64.whl.metadata (1.5 kB)
Collecting ete3 (from anvio==8)
  Using cached ete3-3.1.3.tar.gz (4.8 MB)
  Preparing metadata (setup.py) ... done
Collecting scikit-learn==1.2.2 (from anvio==8)
  Using cached scikit_learn-1.2.2-cp310-cp310-macosx_10_9_x86_64.whl (9.1 MB)
Collecting django (from anvio==8)
  Obtaining dependency information for django from https://files.pythonhosted.org/packages/b9/45/707dfc56f381222c1c798503546cb390934ab246fc45b5051ef66e31099c/Django-4.2.6-py3-none-any.whl.metadata
  Using cached Django-4.2.6-py3-none-any.whl.metadata (4.1 kB)
Requirement already satisfied: requests in ./miniconda3/envs/anvio-8/lib/python3.10/site-packages (from anvio==8) (2.31.0)
Collecting mistune (from anvio==8)
  Obtaining dependency information for mistune from https://files.pythonhosted.org/packages/f0/74/c95adcdf032956d9ef6c89a9b8a5152bf73915f8c633f3e3d88d06bd699c/mistune-3.0.2-py3-none-any.whl.metadata
  Using cached mistune-3.0.2-py3-none-any.whl.metadata (1.7 kB)
Collecting six (from anvio==8)
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting matplotlib (from anvio==8)
  Obtaining dependency information for matplotlib from https://files.pythonhosted.org/packages/30/5b/a6214caaa5adf07b52aecba98fdace32cc51e63a1fcc1f98d60ec128a6c0/matplotlib-3.8.0-cp310-cp310-macosx_10_12_x86_64.whl.metadata
  Using cached matplotlib-3.8.0-cp310-cp310-macosx_10_12_x86_64.whl.metadata (5.8 kB)
Collecting statsmodels (from anvio==8)
  Using cached statsmodels-0.14.0-cp310-cp310-macosx_10_9_x86_64.whl (9.9 MB)
Collecting colored (from anvio==8)
  Obtaining dependency information for colored from https://files.pythonhosted.org/packages/6f/0d/a10351ef1a98e0b03d66887ec2d87c261f9a0fbff8f2bdb75614cc0a2850/colored-2.2.3-py3-none-any.whl.metadata
  Using cached colored-2.2.3-py3-none-any.whl.metadata (3.6 kB)
Collecting illumina-utils (from anvio==8)
  Using cached illumina-utils-2.12.tar.gz (2.3 MB)
  Preparing metadata (setup.py) ... done
Collecting tabulate (from anvio==8)
  Using cached tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting rich-argparse (from anvio==8)
  Obtaining dependency information for rich-argparse from https://files.pythonhosted.org/packages/c3/7a/0e398b736af0e37c733294f91907d5f979ca99a9c75f97213b0ab02d9a05/rich_argparse-1.3.0-py3-none-any.whl.metadata
  Using cached rich_argparse-1.3.0-py3-none-any.whl.metadata (11 kB)
Collecting numba (from anvio==8)
  Obtaining dependency information for numba from https://files.pythonhosted.org/packages/4a/1d/ecc1948837253fd3f7a99b720838602396fcee765d614d1a38e9de15aea7/numba-0.58.0-cp310-cp310-macosx_10_9_x86_64.whl.metadata
  Using cached numba-0.58.0-cp310-cp310-macosx_10_9_x86_64.whl.metadata (2.7 kB)
Collecting paste (from anvio==8)
  Obtaining dependency information for paste from https://files.pythonhosted.org/packages/96/af/66ce3761144401d88029018a9648f3a479537be428e556d6caebe0525e05/Paste-3.6.0-py2.py3-none-any.whl.metadata
  Using cached Paste-3.6.0-py2.py3-none-any.whl.metadata (4.7 kB)
Collecting pyani (from anvio==8)
  Using cached pyani-0.2.12-py3-none-any.whl (59 kB)
Collecting psutil (from anvio==8)
  Using cached psutil-5.9.5-cp36-abi3-macosx_10_9_x86_64.whl (245 kB)
Collecting pandas==1.4.4 (from anvio==8)
  Using cached pandas-1.4.4-cp310-cp310-macosx_10_9_x86_64.whl (11.5 MB)
Collecting snakemake (from anvio==8)
  Using cached snakemake-7.32.4.tar.gz (371 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [65 lines of output]
      running dist_info
      creating /private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-modern-metadata-dldzkx_6/snakemake.egg-info
      writing /private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-modern-metadata-dldzkx_6/snakemake.egg-info/PKG-INFO
      writing dependency_links to /private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-modern-metadata-dldzkx_6/snakemake.egg-info/dependency_links.txt
      writing entry points to /private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-modern-metadata-dldzkx_6/snakemake.egg-info/entry_points.txt
      writing requirements to /private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-modern-metadata-dldzkx_6/snakemake.egg-info/requires.txt
      writing top-level names to /private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-modern-metadata-dldzkx_6/snakemake.egg-info/top_level.txt
      writing manifest file '/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-modern-metadata-dldzkx_6/snakemake.egg-info/SOURCES.txt'
      reading manifest file '/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-modern-metadata-dldzkx_6/snakemake.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE.md'
      adding license file 'AUTHORS.rst'
      writing manifest file '/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-modern-metadata-dldzkx_6/snakemake.egg-info/SOURCES.txt'
      creating '/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-modern-metadata-dldzkx_6/snakemake-7.32.4.dist-info'
      Traceback (most recent call last):
        File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 396, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 14, in <module>
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/command/dist_info.py", line 112, in run
          bdist_wheel = self.get_finalized_command('bdist_wheel')
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 304, in get_finalized_command
          cmd_obj = self.distribution.get_command_obj(command, create)
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 860, in get_command_obj
          klass = self.get_command_class(command)
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 736, in get_command_class
          self.cmdclass[command] = cmdclass = ep.load()
        File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
          module = import_module(match.group('module'))
        File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/importlib/__init__.py", line 126, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
        File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 883, in exec_module
        File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/normal/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 28, in <module>
          from .macosx_libfile import calculate_macosx_platform_tag
        File "/private/var/folders/71/xm3vqjnn3xv2vtqkfhmrtzyh0000gp/T/pip-build-env-xj65cmu9/normal/lib/python3.10/site-packages/wheel/macosx_libfile.py", line 43, in <module>
          import ctypes
        File "/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/ctypes/__init__.py", line 8, in <module>
          from _ctypes import Union, Structure, Array
      ImportError: dlopen(/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/lib-dynload/_ctypes.cpython-310-darwin.so, 0x0002): Library not loaded: @rpath/libffi.8.dylib
        Referenced from: <7A7FF4C9-CBE7-3806-BA9C-70766D7F259A> /Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/lib-dynload/_ctypes.cpython-310-darwin.so
        Reason: tried: '/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/lib-dynload/../../libffi.8.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/zaccooper/miniconda3/envs/anvio-8/lib/python3.10/lib-dynload/../../libffi.8.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/zaccooper/miniconda3/envs/anvio-8/bin/../lib/libffi.8.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/zaccooper/miniconda3/envs/anvio-8/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, not in dyld cache)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
metehaansever commented 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.

zscooper commented 10 months ago

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
metehaansever commented 10 months ago

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.

zscooper commented 10 months ago

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
zscooper commented 10 months ago

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.

ivagljiva commented 7 months ago

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.