MetaPhlAn 4.0.4 seems to have an issue related to h5py/numpy; I'm not sure if the issue is already
present in previous MetaPhlAn releases since I only tested 4.0.4.
[sjaenick@hp-dl560:~ ]$ /vol/mgx-sw/bin/metaphlan --nproc 1 --offline -t reads_map --no_map --bowtie2db /vol/biodb/local_databases/MGX/MetaPhlAn4/ --bowtie2_exe /vol/mgx-sw/bin/bowtie2 --input_type fastq ~/testdata.fq -o ~/testdata.m4.out
Traceback (most recent call last):
File "/vol/mgx-sw/bin/metaphlan", line 5, in <module>
from metaphlan.metaphlan import main
File "/vol/mgx-sw/lib/python3.11/site-packages/metaphlan/metaphlan.py", line 54, in <module>
import biom
File "/vol/mgx-sw/lib/python3.11/site-packages/biom_format-2.1.14-py3.11-linux-x86_64.egg/biom/__init__.py", line 51, in <module>
from .table import Table
File "/vol/mgx-sw/lib/python3.11/site-packages/biom_format-2.1.14-py3.11-linux-x86_64.egg/biom/table.py", line 190, in <module>
from biom.util import (get_biom_format_version_string,
File "/vol/mgx-sw/lib/python3.11/site-packages/biom_format-2.1.14-py3.11-linux-x86_64.egg/biom/util.py", line 25, in <module>
import h5py
File "/vol/mgx-sw/lib/python3.11/site-packages/h5py/__init__.py", line 46, in <module>
from ._conv import register_converters as _register_converters
File "h5py/_conv.pyx", line 1, in init h5py._conv
File "h5py/h5t.pyx", line 293, in init h5py.h5t
File "/vol/mgx-sw/lib/python3.11/site-packages/numpy/__init__.py", line 284, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'typeDict'
To Reproduce
Ubuntu 20.04.5 LTS with Python 3.11 (compiled from source), installation was done as follows:
VERSION=4.0.4
wget -q https://github.com/biobakery/MetaPhlAn/archive/refs/tags/${VERSION}.tar.gz
tar xzf ${VERSION}.tar.gz
rm ${VERSION}.tar.gz
cd MetaPhlAn-${VERSION}
pip3 install .
cd ..
rm -rf MetaPhlAn-${VERSION}
and ended up with a working MetaPhlAn installation with the following dependencies:
h5py 3.7.0
biom-format 2.1.14
numpy 1.24.1
Please note same versions for biom-format and numpy, but a different major release version for h5py'; I'm not exactly a Python person, but maybe MetaPhlAn should require a minimum version for the h5py dependency.
Thank you for creating this issue.
We currently field issues through our bioBakery Discourse Support Forum.
If you would please post the issue to discourse we would be happy to sync up with you to get it resolved.
Describe the bug
MetaPhlAn 4.0.4 seems to have an issue related to h5py/numpy; I'm not sure if the issue is already present in previous MetaPhlAn releases since I only tested 4.0.4.
To Reproduce
Ubuntu 20.04.5 LTS with Python 3.11 (compiled from source), installation was done as follows:
I manually purged some packages, deleted the pip cache and reinstalled MetaPhlAn:
and ended up with a working MetaPhlAn installation with the following dependencies:
Please note same versions for
biom-format
andnumpy
, but a different major release version forh5py
'; I'm not exactly a Python person, but maybe MetaPhlAn should require a minimum version for theh5py
dependency.