Error! numpy python library not detected!!

751 views
Skip to first unread message

charlottec

unread,
Jun 22, 2018, 12:23:53 PM6/22/18
to MetaPhlAn-users
Hi All,

I'm wondering if anyone can help me... I'm very new to programming and Metagenomic analysis!

I have downloaded Metaphlan2 and all of its dependencies via Conda, in a conda environment. I am trying to profile metagenomic paired end samples. I was testing this code preliminarily:

metaphlan2.py S1_QC_1.fastq, S1_QC_2.fastq --bowtie2db --bowtie2out bowtie_output_S1.bz2 -t rel_ab_w_read_stats --nproc 12 --input_type fastq

But I keep getting the Error message: Error! numpy python library not detected!!

When I check to see if numpy is installed and updated, it is. I tried python -c "import numpy; print numpy.__version__" but this gave the error:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/pub*/*/miniconda2/envs/metaphlan/lib/python2.7/site-packages/numpy/__init__.py", line 142, in <module>
from . import add_newdocs
File "/pub*/*/miniconda2/envs/metaphlan/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/pub*/*/miniconda2/envs/metaphlan/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/pub*/*/miniconda2/envs/metaphlan/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/pub*/*/miniconda2/envs/metaphlan/lib/python2.7/site-packages/numpy/core/__init__.py", line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.

Original error was: /lib/libc.so.6: version `GLIBC_2.10' not found (required by /pub*/*/miniconda2/envs/metaphlan/lib/python2.7/site-packages/numpy/core/multiarray.so)


I'm unsure of how to fix this, does anyone have any ideas?


Thank you in advance!!

Francesco Asnicar

unread,
Jun 23, 2018, 3:44:00 AM6/23/18
to charlottec, MetaPhlAn-users
Hello,

It seems that there are conflicts with different numpy installations in your system that are causing the error.
The fact that you got the error with:

python -c "import numpy; print numpy.__version__"

it means that also MetaPhlAn is detecting the same problem. Most likely you have a numpy installation in your system python (not the one in the conda environment) that is causing this problem, somehow conflicting with the numpy installed in your environment. One way to try is to uninstall numpy from the python in your system and see if this resolve the conflicts. If not, it might be that you have to uninstall and reinstall numpy also in the environment.


A side note, I noticed that in the command you're issuing there is a space between the inputs:

$ metaphlan2.py S1_QC_1.fastq, S1_QC_2.fastq --bowtie2db --bowtie2out bowtie_output_S1.bz2 -t rel_ab_w_read_stats --nproc 12 --input_type fastq

This can cause problems because the file after the space will be interpreted as a parameter, so the command should be:

metaphlan2.py S1_QC_1.fastq,S1_QC_2.fastq --bowtie2db --bowtie2out bowtie_output_S1.bz2 -t rel_ab_w_read_stats --nproc 12 --input_type fastq


Many thanks,
Francesco

--
You received this message because you are subscribed to the Google Groups "MetaPhlAn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

charlottec

unread,
Jun 25, 2018, 6:37:32 AM6/25/18
to MetaPhlAn-users
Hi Francesco,

Thank you very much for your reply!

I have tried uninstalling numpy from my python system and from the environment. But I am still getting the same error message! I will maybe try downloading and using metaphlan but not via conda.

Thank you again!

Charlotte
Reply all
Reply to author
Forward
0 new messages