Error installing qiime2-2023.2 on M2 Mac

Hello,

I've been trying to install QIIME2 on my new mac (M2 Pro chip, macOS 13.2.1) and I am having issues. I saw similar posts about issues using M1 macs, but my issue seems to be different.

I first tried installing with Miniconda (conda version 23.3.1), which I also just installed today, and I followed the instructions here for installing qiime2 for MacOS (Apple Silicon). I ran into an error at the end of the download, which I will reproduce below. After reading some of the other QIIME2 forum downloading errors, I tried removing my QIIME2 environment and un-installing Miniconda, then installing Anaconda3 (conda version 23.3.1) and trying the QIIME2 download again. I tried both the MacOS (Apple Silicon) and the MacOS (Intel) versions, removing the qiime2 conda environment directories between each attempt, and nothing has worked.

Here are my current versions of each program:
python --version
Python 3.10.9

conda --version
conda 23.3.1

wget --version
GNU Wget 1.21.3 built on darwin20.0.0.

I ran the following commands (note that I simplified the name of my environment to qiime2):

conda install wget
wget https://data.qiime2.org/distro/core/qiime2-2023.2-py38-osx-conda.yml
CONDA_SUBDIR=osx-64 conda env create -n qiime2 --file qiime2-2023.2-py38-osx-conda.yml
conda activate qiime2-2023.2

^ Creating the environment is where it fails each time. It downloaded everthing successfully, and almost finished, but I always run into this error at the end (same error for Miniconda vs. Conda, and Intel vs. Silicon versions):

Collecting package metadata (repodata.json): done
Solving environment: done
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(740): An error occurred while installing package 'bioconda::bioconductor-genomeinfodbdata-1.2.9-r42hdfd78af_0'.
Rolling back transaction: done

LinkError: post-link script failed for package bioconda::bioconductor-genomeinfodbdata-1.2.9-r42hdfd78af_0
location of failed script: /Users/brookeweigel/anaconda3/envs/qiime2/bin/.bioconductor-genomeinfodbdata-post-link.sh
==> script messages <==

==> script output <==
stdout:
stderr: /Users/brookeweigel/anaconda3/envs/qiime2/bin/tab-qiime: /Users/brookeweigel/anaconda3/envs/qiime2/bin/qiime: /Users/brookeweigel/anaconda3/envs/qiime2/bin/python: bad interpreter: Bad CPU type in executable
++ dirname -- /Users/brookeweigel/anaconda3/envs/qiime2/bin/installBiocDataPackage.sh

  • SCRIPT_DIR=/Users/brookeweigel/anaconda3/envs/qiime2/bin/../share/bioconductor-data-packages
  • json=/Users/brookeweigel/anaconda3/envs/qiime2/bin/../share/bioconductor-data-packages/dataURLs.json
    ++ yq '."genomeinfodbdata-1.2.9".fn' /Users/brookeweigel/anaconda3/envs/qiime2/bin/../share/bioconductor-data-packages/dataURLs.json
    /Users/brookeweigel/anaconda3/envs/qiime2/bin/installBiocDataPackage.sh: /Users/brookeweigel/anaconda3/envs/qiime2/bin/yq: /Users/brookeweigel/anaconda3/envs/qiime2/bin/python3.8: bad interpreter: Bad CPU type in executable
  • FN=

return code: 126
()

I'm still able to activate my qiime2 environment with "conda activate qiime2" but it does not work.
When I run "qiime --help" it says "zsh: command not found: qiime"

Please help! I've been a qiime2 user for a long time, and I would really like to run it on my new mac soon to analyze some exciting data! Thank you! :slight_smile:

@BrookeWeigel,

Did you run conda init as part of the installation of Conda? Could you post the output of conda info and echo $PATH ?

Hello @Keegan-Evans! Yes, I ran "conda init" during the installation process. Here is the output of conda info and echo $PATH:

(base) brookeweigel@Brookes-MacBook-Pro ~ % conda info

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

populated config files :
conda version : 23.3.1
conda-build version : 3.24.0
python version : 3.10.9.final.0
virtual packages : __archspec=1=arm64
__osx=13.2.1=0
__unix=0=0
base environment : /Users/brookeweigel/anaconda3 (writable)
conda av data dir : /Users/brookeweigel/anaconda3/etc/conda
conda av metadata url : None
channel URLs : main/osx-arm64
main/noarch
r/osx-arm64
r/noarch
package cache : /Users/brookeweigel/anaconda3/pkgs
/Users/brookeweigel/.conda/pkgs
envs directories : /Users/brookeweigel/anaconda3/envs
/Users/brookeweigel/.conda/envs
platform : osx-arm64
user-agent : conda/23.3.1 requests/2.28.1 CPython/3.10.9 Darwin/22.3.0 OSX/13.2.1
UID:GID : 501:20
netrc file : None
offline mode : False

(base) brookeweigel@Brookes-MacBook-Pro ~ % echo $PATH
/Users/brookeweigel/anaconda3/bin:/Users/brookeweigel/anaconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin

1 Like

@BrookeWeigel,

Have you tried this again? It looks like maybe it was a connectivity issue when downloading one of the QIIME 2 dependencies, would you be willing to try it again today and let us know how it goes?

Hi @Keegan-Evans, I just tried again, on really fast internet (different wifi location than the first attempt) and I'm still running into the same error. What else can I do??

This is what happened, again:

(base) brookeweigel@Brookes-MacBook-Pro ~ % CONDA_SUBDIR=osx-64 conda env create -n qiime2 --file qiime2-2023.2-py38-osx-conda.yml
Retrieving notices: ...working... done
Collecting package metadata (repodata.json): done
Solving environment: done

Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(740): An error occurred while installing package 'bioconda::bioconductor-genomeinfodbdata-1.2.9-r42hdfd78af_0'.
Rolling back transaction: done

LinkError: post-link script failed for package bioconda::bioconductor-genomeinfodbdata-1.2.9-r42hdfd78af_0
location of failed script: /Users/brookeweigel/anaconda3/envs/qiime2/bin/.bioconductor-genomeinfodbdata-post-link.sh
==> script messages <==

==> script output <==
stdout:
stderr: /Users/brookeweigel/anaconda3/envs/qiime2/bin/tab-qiime: /Users/brookeweigel/anaconda3/envs/qiime2/bin/qiime: /Users/brookeweigel/anaconda3/envs/qiime2/bin/python: bad interpreter: Bad CPU type in executable
++ dirname -- /Users/brookeweigel/anaconda3/envs/qiime2/bin/installBiocDataPackage.sh

  • SCRIPT_DIR=/Users/brookeweigel/anaconda3/envs/qiime2/bin/../share/bioconductor-data-packages
  • json=/Users/brookeweigel/anaconda3/envs/qiime2/bin/../share/bioconductor-data-packages/dataURLs.json
    ++ yq '."genomeinfodbdata-1.2.9".fn' /Users/brookeweigel/anaconda3/envs/qiime2/bin/../share/bioconductor-data-packages/dataURLs.json
    /Users/brookeweigel/anaconda3/envs/qiime2/bin/installBiocDataPackage.sh: /Users/brookeweigel/anaconda3/envs/qiime2/bin/yq: /Users/brookeweigel/anaconda3/envs/qiime2/bin/python3.8: bad interpreter: Bad CPU type in executable
  • FN=

return code: 126

()

Hello @BrookeWeigel,

Can you run this command: pgrep oahd in your terminal and tell us what is output?

This will tell us whether you have rosetta 2 installed, which is important because you are using newer Mac chips.

2 Likes

Hi @colinvwood, I ran that command, and nothing happened. So what does that mean? Do I need to install something else to get it to work? Thanks!

(base) brookeweigel@Brookes-MacBook-Pro ~ % pgrep oahd
(base) brookeweigel@Brookes-MacBook-Pro ~ %

Hello @BrookeWeigel,

It looks like you don't have rosetta 2 installed, new Macs don't come with it by default, but it's needed for this.

You can run this command to install it: softwareupdate --install-rosetta. Try everything again after doing this, and let us know if this fixes your problem!

3 Likes

Hi @colinvwood @Keegan-Evans, that worked!! I installed rosetta on my new mac, then I followed the qiime2 conda download protocol for MacOS (Apple Silicon), and it worked! qiime2 is now running :star_struck: Thank you so much for helping me, and I hope that this helps other people with new M1 / M2 macs! :slightly_smiling_face:

3 Likes

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