pyGenomeTracks icon indicating copy to clipboard operation
pyGenomeTracks copied to clipboard

Error after installing pyGenomeTracks - ImportError H5Pget_fapl_direct

Open gene-drive opened this issue 2 years ago • 2 comments

Hi, I installed pyGenomeTracks using conda and mamba:

conda create -n pygenometracks -c bioconda -c conda-forge mamba python=3.7
conda activate pygenometracks
mamba install -c defaults -c bioconda -c conda-forge pygenometracks

Everything looked like it went well, however this is the error I'm seeing:

pyGenomeTracks --help
Traceback (most recent call last):
  File "/home/user_vm/anaconda3/envs/pygenometracks/bin/pyGenomeTracks", line 4, in <module>
    from pygenometracks.plotTracks import main
  File "/home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/pygenometracks/plotTracks.py", line 149, in <module>
    from pygenometracks.tracksClass import PlotTracks
  File "/home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/pygenometracks/tracksClass.py", line 17, in <module>
    from pygenometracks.tracks.GenomeTrack import GenomeTrack
  File "/home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/pygenometracks/tracks/__init__.py", line 7, in <module>
    mod = __import__('.'.join([__name__, py]), fromlist=[py])
  File "/home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/pygenometracks/tracks/HiCMatrixSquareTrack.py", line 3, in <module>
    from . HiCMatrixLikeTrack import HiCMatrixLikeTrack
  File "/home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/pygenometracks/tracks/HiCMatrixLikeTrack.py", line 1, in <module>
    from hicmatrix import HiCMatrix
  File "/home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/hicmatrix/HiCMatrix.py", line 14, in <module>
    import cooler
  File "/home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/cooler/__init__.py", line 14, in <module>
    from .api import Cooler, annotate
  File "/home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/cooler/api.py", line 11, in <module>
    import h5py
  File "/home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/h5py/__init__.py", line 33, in <module>
    from . import version
  File "/home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/h5py/version.py", line 15, in <module>
    from . import h5 as _h5
  File "h5py/h5.pyx", line 1, in init h5py.h5
ImportError: /home/user_vm/anaconda3/envs/pygenometracks/lib/python3.7/site-packages/h5py/defs.cpython-37m-x86_64-linux-gnu.so: undefined symbol: H5Pget_fapl_direct

gene-drive avatar Aug 18 '22 19:08 gene-drive

Hi, Thanks for reporting this error. This is an issue with mamba resolution. By default, it installs h5py version 'nompi':

$ conda list | grep h5py
h5py                      3.7.0           nompi_py37hc97082c_100    conda-forge

But hdf5 with mpi:

$ conda list | grep hdf5
hdf5                      1.12.1               h70be1eb_2  

To solve it, activate pygenometracks and do:

$ conda install hdf5
....
The following packages will be UPDATED:

  hdf5                    pkgs/main::hdf5-1.12.1-h70be1eb_2 --> conda-forge::hdf5-1.12.1-nompi_h2386368_104

I will fix the documentation for installation, as it is the -c default which messes up. For the next time, you can do:

conda create -n pygenometracks -c bioconda -c conda-forge mamba python=3.7
conda activate pygenometracks
mamba install -c bioconda -c conda-forge pygenometracks

Tell me if it fixes it.

lldelisle avatar Aug 22 '22 05:08 lldelisle

Thank you for the response and solution.

In the meantime, I tried an alternative installation method that worked for me: pip install pyGenomeTracks

gene-drive avatar Aug 22 '22 16:08 gene-drive