Installing HUMAnN3 with conda

I am trying to install HUMAnN3 using the following commands
conda create --name biobakery3 python=3.7
source activate biobakery3
conda install humann -c biobakery

but I am stuck on this message

  • humann -> metaphlan >=3.0.0.alpha

When I tried to install metaphlan separately by using
conda install metaphlan -c bioconda

I get
UnsatisfiableError: The following specifications were found to be in conflict:

  • metaphlan -> biom-format -> pyqi ==0.3.1 -> python 2.7* -> openssl 1.0.1*
  • metaphlan -> biom-format -> pyqi ==0.3.1 -> python 2.7* -> readline 6.2*
  • metaphlan -> biom-format -> pyqi ==0.3.1 -> python 2.7* -> tk 8.5*
  • python 3.7*

I tried to use python 2.7 and get this error instead.

  • metaphlan -> matplotlib-base -> python >=3.6,<3.7.0a0
  • python 2.7*

Seems like I need python 2.7 for pyqi, but python 3.6 for metaphlan. Is there something I need to do in my setting to be able to set up a HUMAnN3 conda envirment?

Hmm, I haven’t seen this. Sometimes conda installation problems are related to the priority of the channels it’s drawing from. MetaPhlAn comes from bioconda and they recommend a specific channel priority for installation:

https://bioconda.github.io/user/install.html#set-up-channels

I also had problems running the the latest humann. It failed at installing the latest metaphlan’s mpa tar file. Installing humann via conda did not install the latest metaphlan build.

What worked for me is to specify the build when installing: conda install metaphlan=3.0=pyh5ca1d4c_2 --no-channel-priority

The parameter --no-channel-priority may not be necessary

Without specifying the build when installing it will install the older build pyh5ca1d4c_1 instead

Thank you both for answering my question.

Setting up the bioconda channel priority fixed the problem for me!

Great! I’ll add a note about that to the install instructions.

Just an follow up on this.
Although the test ran fine, when I tried to run my own samples, it gave me an error message. I used aimirza’s suggestion and updated metaphlan. It works fine after that.

Link to install bioconda channels instructions is no longer available. When I try to install metaphlan (both with and without the above suggested line of code), I obtain the error message below. I would greatly appreciate assistance.Thank you in advance!

LibMambaUnsatisfiableError: Encountered problems while solving:

  • nothing provides pysam needed by metaphlan-3.0-pyh5ca1d4c_2
  • cannot install both pin-1-1 and pin-1-1

Could not solve for environment specs
The following packages are incompatible
├─ metaphlan ==3.0 pyh5ca1d4c_2 is not installable because it requires
│ └─ pysam, which does not exist (perhaps a missing channel);
└─ pin-1 is installable with the potential options
├─ pin-1 1, which can be installed;
└─ pin-1 1 conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:

  • python 3.11.* (labeled as ‘pin-1’)