Metaphlan3 installation fails

Try installing it in a new clean and empty environment: first run conda install -c bioconda metaphlan and then conda install -c biobakery humann

Hi all,
I also have a problem in installation.

I would be very glad for your help.

I created env called metaphlan-3.0 and activated it.
I installed inside, python 3.7, biopython, numpy, setuptools, bowtie2.

Then I run the command:
(metaphlan-3.0) ~/WORK/SCRIPTS_APPS/miniconda/envs/metaphlan-3.0/bin conda install metaphlan=3.0.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
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.
This can take several minutes. Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

What should I do it now?

Thank you a lot for your advice,

Dorota

Could you try install only python 3.7 in the environment and then let the MetaPhlAn recipe install all the dependencies? It may have installed some uncompatible versions and therefore the error is raised.

In case it’s helpful for someone later, I didn’t have luck downloading MetaPhlAn with conda (it kept trying to download the 3.0 pyh5ca1d4c_1 version that breaks during metaphlan --install), but pip worked:

conda create -n metaphlan python=3.7
source activate metaphlan
pip install metaphlan

This installation didn’t include bowtie2 as a dependency, so I downloaded that with conda install -c bioconda bowtie2.

Hope this helps,
Lev

1 Like

I’m now getting a similar problem using v3.0.13

$ conda list
...
metaphlan                 3.0.13             pyhb7b1952_0    bioconda
...
$  metaphlan inputs/SRS014459-Stool.fasta.gz . --input_type fastq

Downloading MetaPhlAn database
Please note due to the size this might take a few minutes

File /home/kevin/.julia/conda/3/envs/biobakery/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.
tar already present!

File /home/kevin/.julia/conda/3/envs/biobakery/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.
md5 already present!
Traceback (most recent call last):
  File "/home/kevin/.julia/conda/3/envs/biobakery/bin/metaphlan", line 10, in <module>
    sys.exit(main())
  File "/home/kevin/.julia/conda/3/envs/biobakery/lib/python3.7/site-packages/metaphlan/metaphlan.py", line 985, in main
    pars['index'] = check_and_install_database(pars['index'], pars['bowtie2db'], pars['bowtie2_build'], pars['nproc'], pars['force_
download'])
  File "/home/kevin/.julia/conda/3/envs/biobakery/lib/python3.7/site-packages/metaphlan/__init__.py", line 304, in check_and_instal
l_database
    download_unpack_tar(index, bowtie2_db, bowtie2_build, nproc, use_zenodo)
  File "/home/kevin/.julia/conda/3/envs/biobakery/lib/python3.7/site-packages/metaphlan/__init__.py", line 180, in download_unpack_
tar
    bt2_build_output = subp.check_output([bowtie2_build, '--usage'], stderr=subp.STDOUT)
  File "/home/kevin/.julia/conda/3/envs/biobakery/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/home/kevin/.julia/conda/3/envs/biobakery/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)

Here are the contents of the database directory:

$ ls /home/kevin/.julia/conda/3/envs/biobakery/lib/python3.7/site-packages/metaphlan/metaphlan_databases/
mpa_latest                     mpa_v30_CHOCOPhlAn_201901.fna.bz2  mpa_v30_CHOCOPhlAn_201901.pkl  README.txt
mpa_v30_CHOCOPhlAn_201901.fna  mpa_v30_CHOCOPhlAn_201901.md5      mpa_v30_CHOCOPhlAn_201901.tar

This appeared to be a problem with bowtie2, running

sudo apt install libtbb2

seemed to fix it, but I’m wondering why that binary dep isn’t handled by conda

I am having the exact same problem. The environment is installed, but when installing the database the download/decrompressing is fine, but then I also experience the exact same issue with bowtie2-build. I am working on a computing cluster, and have no sudo permissions to install the library mentioned above, should this not be part of the conda environment?

Sorry for not replying here, but I also discovered this biostars post - TLDR:

conda install tbb=2020.2