HUMAnN installs for Python 3.12 in a Python 3.13 environment

Hello,

I’m encountering a Python version mismatch when trying to install HUMAnN and MetaPhlAn in a new Conda environment, and I would appreciate some guidance on the safest way to resolve it.

My default (base) environment uses Python 3.13. When I create a new environment using the recommended command:

Bash

mamba create -n humann_env -c conda-forge -c bioconda -c defaults humann metaphlan

The command successfully creates an environment with a python3.13 directory. However, it installs the humann package and its dependencies into a separate python3.12/site-packages directory within the same environment.

Because the environment’s active interpreter is Python 3.13, it cannot find the HUMAnN module, leading to a ModuleNotFoundError.

I was able to temporarily fix this by manually copying the humann folder from the python3.12 site-packages to the python3.13 site-packages. While this makes the humann --version command work, I am uncomfortable with this manual fix, as I suspect it will cause conflicts with future package updates or installations.

Is there a recommended or safer way to install HUMAnN and MetaPhlAn to make them work with Python 3.13? Or is it currently only stable with Python 3.12, in which case I should create an environment specifically with that version?

Thank you for your help and suggestions.

I know we’ve been testing on Python 3.12 based on the release notes, so setting up a 3.12 environment for both MetaPhlAn + HUMAnN seems like a safe bet to me? The other thing I’ll note is that you’re installing the packages from -c bioconda. Notably we provide official conda releases for our software via -c biobakery, so I’m actually not sure what you’re getting with the bioconda releases. At one point in the past I believe some of those were out of sync / had issues that weren’t present in the “official” releases.