RuntimeError: h5py is not installed - it is installed

966 views
Skip to first unread message

Vini Salazar

unread,
Feb 16, 2016, 1:26:45 PM2/16/16
to Qiime 1 Forum
Hello guys, first of all thanks for the open source software and all the great support.

I'm still struggling to start using qiime. I have managed to do a successful native base install on OS X after having a few problems.

While doing the 454 Overview Tutorial, when I input the command:


$ biom summarize_table -i otus/otu_table.biom

I get the following output:


Traceback (most recent call last):


 
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/biom", line 9, in <module>


    load_entry_point('biom-format==2.1.5', 'console_scripts', 'biom')()


  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 700, in __call__


    return self.main(*args, **kwargs)


  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 680, in main


    rv = self.invoke(ctx)


  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 1027, in invoke


    return _process_result(sub_ctx.command.invoke(sub_ctx))


  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 873, in invoke


    return ctx.invoke(self.callback, **ctx.params)


  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 508, in invoke


    return callback(*args, **kwargs)


  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/biom/cli/table_summarizer.py", line 47, in summarize_table


    table = load_table(input_fp)


  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/biom/parse.py", line 652, in load_table


    with biom_open(f) as fp:


  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in __enter__


    return self.gen.next()


  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/biom/util.py", line 444, in biom_open


    raise RuntimeError("h5py is not installed, cannot parse HDF5 "


RuntimeError: h5py is not installed, cannot parse HDF5 BIOM file


However, I have h5py and HDF5 installed. I can check it when I run the config script:


$ print_qiime_config.py -t

System information


==================


         Platform:      darwin


   Python version:      2.7.11 |Anaconda 2.3.0 (x86_64)| (default, Dec  6 2015, 18:57:58)  [GCC 4.2.1 (Apple Inc. build 5577)]


Python executable:      //anaconda/bin/python




QIIME default reference information


===================================


For details on what files are used as QIIME's default references, see here:


 https://github.com/biocore/qiime-default-reference/releases/tag/0.1.3




Dependency versions


===================


          QIIME library version:        1.9.0-rc2


           QIIME script version:        1.9.0-rc2


qiime-default-reference version:        0.1.3


                  NumPy version:        1.10.4


                  SciPy version:        0.17.0


                 pandas version:        0.16.2


             matplotlib version:        1.4.3


            biom-format version:        2.1.2


                   h5py version:        2.5.0 (HDF5 version: 1.8.15)


                   qcli version:        0.1.1


                   pyqi version:        0.3.2


             scikit-bio version:        0.2.3


                 PyNAST version:        1.2.2


                Emperor version:        0.9.5


                burrito version:        0.9.1


       burrito-fillings version:        Installed.


              sortmerna version:        SortMeRNA version 2.0, 29/11/2014


              sumaclust version:        Not installed.


                  swarm version:        Swarm 1.2.19 [Jan 29 2015 09:06:53]


                          gdata:        Installed.




QIIME config values


===================


For definitions of these settings and to learn how to configure QIIME, see here:


 http://qiime.org/install/qiime_config.html


 http://qiime.org/tutorials/parallel_qiime.html




                     blastmat_dir:      None


      pick_otus_reference_seqs_fp:      //anaconda/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta


                         sc_queue:      all.q


      topiaryexplorer_project_dir:      None


     pynast_template_alignment_fp:      //anaconda/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set_aligned/85_otus.pynast.fasta


                  cluster_jobs_fp:      start_parallel_jobs.py


pynast_template_alignment_blastdb:      None


assign_taxonomy_reference_seqs_fp:      //anaconda/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta


                     torque_queue:      friendlyq


                    jobs_to_start:      1


            denoiser_min_per_core:      50


assign_taxonomy_id_to_taxonomy_fp:      //anaconda/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/taxonomy/97_otu_taxonomy.txt


                         temp_dir:      /tmp/


                     slurm_memory:      None


                      slurm_queue:      None


                      blastall_fp:      blastall


                 seconds_to_sleep:      1




QIIME base install test results


===============================


.........


----------------------------------------------------------------------


Ran 9 tests in 0.033s




OK


I have tried reinstalling both packages to no avail. I've searched the forum for solutions but couldn't find any. Sorry if this is a silly question but I'm a beginner user and new to this type of tool, so any other advice is appreciated.

Thanks a lot

zech xu

unread,
Feb 16, 2016, 2:37:00 PM2/16/16
to Qiime 1 Forum
Hello,

I noticed you were using anaconda from your qiime config, but the biom error message shows that your global biom library is used. Probably you have installed two bioms, one globally and the other in your anaconda virtual env. First, could you double check you print_qiime_config.py and your biom command were run in the same virtual environment? And if so and you still get the error, could you check your anaconda env dir to see if you have another biom installed in that virtual env?

Vini Salazar

unread,
Feb 16, 2016, 3:29:28 PM2/16/16
to Qiime 1 Forum
I run both of them on the command line without making any intentional changes to which virtual environment was used, like explained in the linked tutorial. My biom apparently is installed in the anaconda env dir.

zech xu

unread,
Feb 16, 2016, 5:01:50 PM2/16/16
to Qiime 1 Forum
You error message clearly shows the biom you were using is not from anaconda virtual env: /Library/Frameworks/Python.framework/Versions/2.7/bin/biom

Vini Salazar

unread,
Feb 17, 2016, 5:08:45 AM2/17/16
to Qiime 1 Forum
Thanks for pointing that out. Do you have any suggestions on how to fix it? I get the error message for the h5py package, and not the biom package

Colin Brislawn

unread,
Feb 17, 2016, 6:29:18 PM2/17/16
to Qiime 1 Forum
Try loading the conda virtual environment first, then running the scripts from inside the environment. 

Colin

Message has been deleted

Vini Salazar

unread,
Feb 19, 2016, 9:05:18 PM2/19/16
to qiime...@googlegroups.com
Thanks for the reply Colin.

I have, and I get the same error message.

Colin Brislawn

unread,
Feb 19, 2016, 10:51:24 PM2/19/16
to Qiime 1 Forum
Hum... I think there is some small step I'm missing when trying to activate the environment. 

Try this,
Open a new terminal or ssh connection. Then run
which python
source activate YourQiimeEnvironmentName
which python
conda list
which print_qiime_config.py
print_qiime_config,py -t

I feel like I'm missing something, but I'm not sure what. Thank you for helping me find it.
Colin

Reply all
Reply to author
Forward
0 new messages