Cannot install Qiime2 Amplicon Distribution on an Apple M3 Pro

Hello, I am trying to install Qiime2 Amplicon Distribution on an Apple M3 Pro following this command:

CONDA_SUBDIR=osx-64 conda env create -n qiime2-amplicon-2024.5 --file https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-osx-conda.yml
conda activate qiime2-amplicon-2024.5
conda config --env --set subdir osx-64

but I get this error:

xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (no such file), '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))).

I have seen in another thread that the macOS (intel) instructions may work instead, so I tried these too: conda env create -n qiime2-amplicon-2024.5 --file https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py39-osx-conda.yml

but I get the same error..

Could you please help? Thank you!

Hello @tkvotsi,

Welcome to the forums! :qiime2:

Your commend looks good, so I'm not sure why this would not work on an M3 chip.

Have you already installed Rosetta2?

Are there any other clues you can provide to us?
Like, can you run conda info and post the result?

Thank you for the prompt reply.

I have installed rosetta following this command, is this correct?
softwareupdate --install-rosetta

this is the conda info:

 active environment : base
active env location : /opt/miniconda3
        shell level : 1
   user config file : /Users/username/.condarc

populated config files :
conda version : 4.12.0
conda-build version : not installed
python version : 3.9.20.final.0
virtual packages : __osx=10.16=0
__unix=0=0
__archspec=1=x86_64
base environment : /opt/miniconda3 (writable)
conda av data dir : /opt/miniconda3/etc/conda
conda av metadata url : None
channel URLs : main/osx-64
main/noarch
r/osx-64
r/noarch
package cache : /opt/miniconda3/pkgs
/Users/username/.conda/pkgs
envs directories : /opt/miniconda3/envs
/Users/username/.conda/envs
platform : osx-64
user-agent : conda/4.12.0 requests/2.32.3 CPython/3.9.20 Darwin/24.0.0 OSX/10.16
UID:GID : 501:20
netrc file : None
offline mode : False

It seems I have an old version of conda but I cannot update to the new version, as running this has not helped: conda update -n base -c defaults conda

conda update -n base -c defaults conda
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.12.0
latest version: 24.9.2
Please update conda by running
$ conda update -n base -c defaults conda

All requested packages already installed.

I think so!

I just had that same issue with conda.

Also, your conda paths are different from mine...

(base) cbrisl@CB-MacBook-Air data % conda info

     active environment : base
    active env location : /Users/cbrisl/miniforge3
            shell level : 1
       user config file : /Users/cbrisl/.condarc
 populated config files : /Users/cbrisl/miniforge3/.condarc
                          /Users/cbrisl/.condarc

Some of yours are inside /opt/ which might be an issue.

How did you install miniconda? Perhaps a fresh conda install would fix this!

Thank you for your help. I have installed all new versions of Anaconda, Miniconda and Minirorge, following this link: Installing on macOS — conda 24.9.3.dev18 documentation

Is this correct?

but now it seems that the conda environment cannot be found. I am not sure if having everything within “/opt/” is an issue as you mentioned but I am not sure how to change this.

This is what I can see when I launch qiime2:
(base) username@Usernames-MacBook-Pro ~ % conda activate qiime2-amplicon-2024.5

EnvironmentNameNotFound: Could not find conda environment: qiime2-amplicon-2024.5
You can list all discoverable environments with conda info --envs.

THIS IS THE OUTPUT of “conda info –envs”:
(base) username@Usernames-MacBook-Pro ~ % conda info --envs
/opt/anaconda3/lib/python3.12/site-packages/conda/base/context.py:198: FutureWarning: Adding 'defaults' to channel list implicitly is deprecated and will be removed in 25.3.

To remove this warning, please choose a default channel explicitly with conda's regular configuration system, e.g. by adding 'defaults' to the list of channels:

conda config --add channels defaults

For more information see Using the .condarc conda configuration file — conda 24.9.2 documentation

deprecated.topic(

conda environments:

                     /Users/username/miniconda3
                     /Users/username/opt/miniconda3

base * /opt/anaconda3
/opt/miniconda3
/opt/miniconda3/envs/qiime2-2022.2
/opt/miniconda3/envs/qiime2-amplicon-2024.5
/opt/miniconda3/envs/qiime2-metagenome-2024.5
/opt/miniconda3/envs/qiime2-tiny-2024.5

THIS IS THE OUTPUT of “conda info”:
(base) username@Usernames-MacBook-Pro ~ % conda info
/opt/anaconda3/lib/python3.12/site-packages/conda/base/context.py:198: FutureWarning: Adding 'defaults' to channel list implicitly is deprecated and will be removed in 25.3.

To remove this warning, please choose a default channel explicitly with conda's regular configuration system, e.g. by adding 'defaults' to the list of channels:

conda config --add channels defaults

For more information see Using the .condarc conda configuration file — conda 24.9.2 documentation

deprecated.topic(

 active environment : base
active env location : /opt/anaconda3
        shell level : 1
   user config file : /Users/username/.condarc

populated config files :
conda version : 24.9.2
conda-build version : 24.5.1
python version : 3.12.4.final.0
solver : libmamba (default)
virtual packages : __archspec=1=m1
__conda=24.9.2=0
__osx=15.0.1=0
__unix=0=0
base environment : /opt/anaconda3 (writable)
conda av data dir : /opt/anaconda3/etc/conda
conda av metadata url : None
channel URLs : main/osx-arm64
main/noarch
r/osx-arm64
r/noarch
package cache : /opt/anaconda3/pkgs
/Users/username/.conda/pkgs
envs directories : /opt/anaconda3/envs
/Users/username/.conda/envs
platform : osx-arm64
user-agent : conda/24.9.2 requests/2.32.2 CPython/3.12.4 Darwin/24.0.0 OSX/15.0.1 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8 aau/0.4.4 c/. s/. e/.
UID:GID : 501:20
netrc file : None
offline mode : False

Okay! Thank you for the detailed update.

Ah, they may conflict with each other. Just pick one. (Miniconda is recommended.)

Here is an example of that conflict:

active env location : /opt/anaconda3
base environment : /opt/anaconda3 (writable)
conda av data dir : /opt/anaconda3/etc/conda
/opt/miniconda3/envs/qiime2-amplicon-2024.5
/opt/miniconda3/envs/qiime2-metagenome-2024.5

So you have a miniconda3 env called 'qiime2-amplicon-2024.5' but it's not where Anaconda can find it.

Remove everything except Miniconda, then reinstall miniconda.
or
Remove everything, then reinstall miniconda

:snake: :package:

Thank you for your help.
I have removed Anaconda and miniconda and installed miniconda again, this time in my home directory (appears as “username” below) instead of being located in the /opt. I've updated my shell configuration file (.zshrc) to reflect this change. However, I still get the same message when I install or run qiime2:

(base) username@Usernames-MacBook-Pro ~ % conda activate qiime2-amplicon-2024.5
xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (no such file), '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))).

THIS IS MY CONDA INFO as it looks now

 active environment : qiime2-amplicon-2024.5
active env location : /Users/username/miniconda3/envs/qiime2-amplicon-2024.5
        shell level : 2
   user config file : /Users/username/.condarc

populated config files : /Users/username/miniconda3/envs/qiime2-amplicon-2024.5/.condarc
conda version : 24.7.1
conda-build version : not installed
python version : 3.12.4.final.0
solver : libmamba (default)
virtual packages : __archspec=1=x86_64
__conda=24.7.1=0
__osx=15.0.1=0
__unix=0=0
base environment : /Users/username/miniconda3 (writable)
conda av data dir : /Users/username/miniconda3/etc/conda
conda av metadata url : None
channel URLs : main/osx-64
main/noarch
r/osx-64
r/noarch
package cache : /Users/username/miniconda3/pkgs
/Users/username/.conda/pkgs
envs directories : /Users/username/miniconda3/envs
/Users/username/.conda/envs
platform : osx-64
user-agent : conda/24.7.1 requests/2.32.3 CPython/3.12.4 Darwin/24.0.0 OSX/15.0.1 solver/libmamba conda-libmamba-solver/24.7.0 libmambapy/1.5.8 aau/0.4.4 c/. s/. e/.
UID:GID : 501:20
netrc file : None
offline mode : False

1 Like

I'm stumped!

Let's see what the Qiime devs recommend!

Hello @tkvotsi,

I am admittedly inexperienced with this because I do not use a Mac. It does not seem as though anyone on our team using Apple silicon Macs has experienced this issue.

I did some Googling, and some people are saying when they got this error message they installed xcode again and that resolved the issue? It is apparently possible that, despite the error suggesting otherwise, xcode command line tools are not installed on your machine at all currently.

ref

2 Likes

It worked! I have re-installed the newest version of Xcode (version 16) and it worked! Thank you and @colinbrislawn so much for your help and patience!

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.