Metaphlan 4 install issue

Ran into some issues in installing and running

1- tried installing metaphlan 4. installation didn’t run when doing “conda create --name mpa -c bioconda python=3.7 metaphlan”. I have python 3.8.5 but I had to run “conda create --name mpa -c bioconda python metaphlan” and even then it installed by running python 3.6.5
2- wouldn’t install to root right away so I had to install doing “sudo conda create --name mpa -c bioconda python metaphlan”
3- once install was good, tried the command and ran into some issues (possibly linked to the fact my machine is local machine running on M1 chips from apple)

To Reproduce
Steps to reproduce the behavior:

sudo conda create --name mpa -c bioconda python metaphlan

metaphlan metagenome_1.fastq,metagenome_2.fastq --bowtie2out meta-test.bowtie2.bz2 --nproc 4 --input_type fastq -o profiled_metagenome-test.txt

Platform (please complete the following information):

  • Version: OSX 12.4 (M1 Chip)
  • Download source: bioconda

Additional note:
tried the install on my local machine which is a MacBook Air with an M1 chip. So could it be a structure issue due to the M1 Chip not being an intel based chip ?

Hi @desplat_yvain
Could you send me the errors the installation if reported to better address this problem?

Some dependencies for MetaPhlAn are not available for osx-arm64, you can rely upon Rosetta2 for running the intel versions.
For doing that you need to create an environment specifying the platform CONDA_SUBDIR=osx-64 conda create -n mpa4. Before installing MetaPhlAn, you need to activate the environment and make the changes permanent by running conda config --env --set subdir osx-64.

This one is when I don’t install using sudo conda …

and this is regardless of the way I installed it and try to run the program

@fbeghini for some reasons this doesn’t work. Unless I did something wrong (which is possible as I am rather new to bioinformatics and using conda environments) so any feedback is greatly appreciated ! See screenshot

Hi! I’m also having trouble installing metaphlan 4.

I created a new conda environment, activated it and ran conda install -c bioconda metaphlan but this installed metaphlan version 3. I then tried updating by specifying the version with conda install -c bioconda metaphlan=4.0.0 and conda install -c bioconda metaphlan=4.0.1 but received an error about python being incompatible. My version of python when creating the environment was 3.7.2, but after inadvertently installing metaphlan 3, it seemed to have been downgraded to 3.6.

So I removed the environment, created a fresh environment (python 3.7.2), activated it, and tried various versions of the install command: conda install -c bioconda metaphlan=4.0.0, conda install -c bioconda metaphlan=4.0.1, conda install -c bioconda -c conda-forge metaphlan=4.0.1. Each time I get a variation of the following error about incompatible packages, despite this being a brand new environment:

Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
Examining tbb: 23%|████████████████████████████████████████▊ | 81/355 [00:00<00:00, 7279.13it//
Comparing specs that have this dependency: 0%| | 0/10 [00:00<?, ?it/s]
Finding shortest conflict path for tbb=2021: 0%| | 0/1 [00:00<?, ?it/s]

The packages being “examined” aren’t always the same, but the error always progresses very slowly and doesn’t seem to finish in a reasonable time frame. I waited over an hour the first time, but eventually killed it.

I’ve tried changing the priority configuration of my conda channels, moving bioconda or conda-forge to the top, setting priority as strict or false, but nothing has helped.

Other conda packages and metaphlan3 have installed without issues, so I’m pretty stumped as to what is going on. If you have any suggestions, I’d really appreciate it!


Try changing the permissions to the conda folder in your user folder with chmod -R u+w /Users/yvaindesplat/anaconda3

Already tried the chmod and it still doesn’t allow me to run the program. I’ve got admin and root privileges on the machine so I really don’t get why it’s not running.

Envoyé de mon iPhone

Solved my own issue. In case it helps anyone else, this finally worked for me:

conda config --set channel_priority false
conda create --name metaphlan4 -c bioconda python=3.7.2 metaphlan=4.0.1