# Metaphlan4 installation issues

**URL:** <https://forum.biobakery.org/t/metaphlan4-installation-issues/5296>\
**Category:** MetaPhlAn\
**Created:** [May 16, 2023, 7:27pm UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296 "2023-05-16T19:27:16Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwdebelius](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/jwdebelius/32/2149_2.png) [@jwdebelius](https://forum.biobakery.org/u/jwdebelius)\
**Post date:** [May 16, 2023, 7:27pm UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296/1 "2023-05-16T19:27:16Z")

</div>

Hi Metaphlan 4 team,

I’m struggling to install metaphlan 4 in a clean conda environment. I’ve been following the instructions described [in your manual/wiki](https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-4#pre-requisites)

It’s difficult to dot he pip installation because there’s not a good list of required package versions so Im not sure what else I need to successfully build that environment. I’ve had issues with the bowtie installation as well.

I’ve taken the following steps:

1. Configured my conda enviroment with a strict priority for bioconda
2. Added in the conda forge channel during installation
3. Tried switching the python versions (3.7, 3.8, 3.9)
4. Offered a sacrifice to my swear jar
5. Tried switching operating systems
6. Tried bargaining with the computer
7. Tried updating my conda environment
8. Tried bargaining with the collaborator about whether they _really_ need metaphlan4 and if we could instead use a different algorithm.

Thus far, I have succeeded in finding 6 ways to not install metaphlan and messed up my conda config on two computers.

Here’s my latest conda error:

```auto
Package python conflicts for:
metaphlan -> biopython -> python[version='>=2.7,<3|>=3.10,<3.11.0a0|>=3.10,<3.11.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.9,<3.10.0a0|>=3.11,<3.12.0a0|>=3.11,<3.12.0a0|>=3.7,<4.0|>=3.6,<4.0|>=3.6',build=*_cpython]
python=3.9
metaphlan -> python[version='2.7.*|>=3|>=3.7']
Note that strict channel priority may have removed packages required for satisfiability.

```

Thanks,  
Justine

---

<div class="post-metadata">

**Author:** ![xiaoafei](https://avatars.discourse-cdn.com/v4/letter/x/2acd7d/32.png) [@xiaoafei](https://forum.biobakery.org/u/xiaoafei)\
**Post date:** [May 17, 2023, 2:40am UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296/2 "2023-05-17T02:40:50Z")

</div>

use mamba to install:

```auto
conda install mamba
conda create -n biobakery4 python=3.7
conda activate biobakery4
mamba install -c conda-forge -c bioconda metaphlan
metaphlan --install --bowtie2db /mnt/shujuku/humann3/metaphlan/SGB

```

by the way，`mamba install -c conda-forge -c bioconda software` can install almost all software in a new environment

---

<div class="post-metadata">

**Author:** ![jwdebelius](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/jwdebelius/32/2149_2.png) [@jwdebelius](https://forum.biobakery.org/u/jwdebelius)\
**Post date:** [May 17, 2023, 1:33pm UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296/3 "2023-05-17T13:33:17Z")

</div>

Hi @xiaoafei,

Thanks for the recomendation! Mamba throws a biom error:

```auto
warning libmamba Cache file "/opt/homebrew/Caskroom/miniforge/base/pkgs/cache/57e79ec4.json" was modified by another program
warning libmamba Cache file "/opt/homebrew/Caskroom/miniforge/base/pkgs/cache/2a957770.json" was modified by another program
warning libmamba Cache file "/opt/homebrew/Caskroom/miniforge/base/pkgs/cache/a850f475.json" was modified by another program
warning libmamba Cache file "/opt/homebrew/Caskroom/miniforge/base/pkgs/cache/09cdf8bf.json" was modified by another program
warning libmamba Cache file "/opt/homebrew/Caskroom/miniforge/base/pkgs/cache/9e99ffaf.json" was modified by another program
warning libmamba Cache file "/opt/homebrew/Caskroom/miniforge/base/pkgs/cache/3e39a7aa.json" was modified by another program
warning libmamba Cache file "/opt/homebrew/Caskroom/miniforge/base/pkgs/cache/8bd55712.json" was modified by another program
warning libmamba Cache file "/opt/homebrew/Caskroom/miniforge/base/pkgs/cache/4ea078d6.json" was modified by another program
bioconda/osx-arm64 129.0 B @ 678.0 B/s 0.2s
pkgs/main/osx-arm64 1.6MB @ 2.7MB/s 0.6s
pkgs/r/osx-arm64 118.0 B @ 184.0 B/s 0.1s
pkgs/r/noarch 1.3MB @ 2.0MB/s 0.5s
bioconda/noarch 4.2MB @ 4.1MB/s 1.1s
pkgs/main/noarch 823.2kB @ 647.0kB/s 0.6s
conda-forge/osx-arm64 6.2MB @ 4.2MB/s 1.7s
conda-forge/noarch 12.3MB @ 4.1MB/s 3.3s
Could not solve for environment specs
The following packages are incompatible
├─ metaphlan is uninstallable because it requires
│ └─ biom-format , which does not exist (perhaps a missing channel);
└─ python 3.7** does not exist (perhaps a typo or a missing channel).

```

So I’m wondering if I should be adding the biocore channel as well. Except that a new version of biom was released last week, which might be part of the issue.

Thanks,  
Justine

---

<div class="post-metadata">

**Author:** ![xiaoafei](https://avatars.discourse-cdn.com/v4/letter/x/2acd7d/32.png) [@xiaoafei](https://forum.biobakery.org/u/xiaoafei)\
**Post date:** [May 17, 2023, 1:47pm UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296/4 "2023-05-17T13:47:55Z")

</div>

are you sure you install in a new environment? if not , you can remove the old environment and create a new one by `conda create -n biobakery4 python=3.7` . and then, try

```auto
conda activate biobakery4
mamba install -c conda-forge -c bioconda -c defaults metaphlan

```

---

<div class="post-metadata">

**Author:** ![jwdebelius](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/jwdebelius/32/2149_2.png) [@jwdebelius](https://forum.biobakery.org/u/jwdebelius)\
**Post date:** [May 17, 2023, 2:21pm UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296/5 "2023-05-17T14:21:19Z")

</div>

Hi @xiaoafei,

I’m trying to build an entirely new isolated enviroment, not install it into a pre-configured enviroment.

```bash
mamba create --name mpa -c bioconda -c conda-forge python=3.7 metaphla

```

As I said earlier in my post,t here’s not a clear list of dependency versions.

Best,  
Justine

---

<div class="post-metadata">

**Author:** ![xiaoafei](https://avatars.discourse-cdn.com/v4/letter/x/2acd7d/32.png) [@xiaoafei](https://forum.biobakery.org/u/xiaoafei)\
**Post date:** [May 17, 2023, 4:51pm UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296/6 "2023-05-17T16:51:34Z")

</div>

try create a new python3.7 environment by conda, and install by mamba just like my former reply

---

<div class="post-metadata">

**Author:** ![jwdebelius](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/jwdebelius/32/2149_2.png) [@jwdebelius](https://forum.biobakery.org/u/jwdebelius)\
**Post date:** [May 17, 2023, 5:07pm UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296/7 "2023-05-17T17:07:51Z")

</div>

Thanks @xiaoafei,

I get a mambda error, suggesting that 3.7 is not a version option for python.

```auto
The following package could not be installed
└─ python 3.7** does not exist (perhaps a typo or a missing channel).

```

Best,  
Justine

---

<div class="post-metadata">

**Author:** ![xiaoafei](https://avatars.discourse-cdn.com/v4/letter/x/2acd7d/32.png) [@xiaoafei](https://forum.biobakery.org/u/xiaoafei)\
**Post date:** [May 18, 2023, 1:41am UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296/8 "2023-05-18T01:41:12Z")

</div>

you can try to edit your `.condarc` file in root, use your country’s mirror instead [https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud](https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud);  
and then, enter my code step by step.  
the detail is unloaded example.txt file  
[example.txt](https://forum.biobakery.org/uploads/short-url/lTUdqf6388UOVT6s87i061AeakA.txt) (35.9 KB)

---

<div class="post-metadata">

**Author:** ![jwdebelius](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/jwdebelius/32/2149_2.png) [@jwdebelius](https://forum.biobakery.org/u/jwdebelius)\
**Post date:** [May 22, 2023, 12:57pm UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296/9 "2023-05-22T12:57:14Z")

</div>

Hi @xiaoafei,

It looks like this requires me to further modify my condarc file, but doesn’t actually address the issue I raised about the biom-format issue. However, regardless of how I configure my national branches, there isn’t a python 3.7 release available for my system. It’s not a geography issue; it’s a version issue.

Best,  
Justine

---

<div class="post-metadata">

**Author:** ![davelunt](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/davelunt/32/2705_2.png) [@davelunt](https://forum.biobakery.org/u/davelunt)\
**Post date:** [February 5, 2024, 3:55pm UTC](https://forum.biobakery.org/t/metaphlan4-installation-issues/5296/10 "2024-02-05T15:55:19Z")

</div>

Hi Justine, I’ve had very similar errors to you. The suggestions above didn’t work for me either. I went through your list too, but my number 9 was “delete and reinstall miniconda”. Now `conda install bioconda::phylophlan` just works again. Good Luck!
