scvi-tools
scvi-tools copied to clipboard
undefined symbol: H5Pset_fapl_ros3
I'm using linux but have this problem! I followed this issue but it couldn't help me solve this. https://github.com/scverse/scvi-tools/issues?q=H5Pset_fapl_ros3#issue-1235458517
import scvi
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 import scvi
File /opt/conda/envs/scvi-env2/lib/python3.9/site-packages/scvi/__init__.py:10, in <module>
7 from ._settings import settings
9 # this import needs to come after prior imports to prevent circular import
---> 10 from . import data, model, external, utils
12 # https://github.com/python-poetry/poetry/pull/2366#issuecomment-652418094
13 # https://github.com/python-poetry/poetry/issues/144#issuecomment-623927302
14 try:
File /opt/conda/envs/scvi-env2/lib/python3.9/site-packages/scvi/data/__init__.py:1, in <module>
----> 1 from anndata import read_csv, read_h5ad, read_loom, read_text
3 from ._datasets import (
4 annotation_simulation,
5 brainlarge_dataset,
(...)
22 synthetic_iid,
23 )
24 from ._manager import AnnDataManager
File /opt/conda/envs/scvi-env2/lib/python3.9/site-packages/anndata/__init__.py:7, in <module>
5 if not within_flit():
6 del within_flit
----> 7 from ._core.anndata import AnnData
8 from ._core.merge import concat
9 from ._core.raw import Raw
File /opt/conda/envs/scvi-env2/lib/python3.9/site-packages/anndata/_core/anndata.py:17, in <module>
14 from typing import Iterable, Sequence, Mapping, MutableMapping # Generic ABCs
15 from typing import Tuple, List # Generic
---> 17 import h5py
18 from natsort import natsorted
19 import numpy as np
File /opt/conda/envs/scvi-env2/lib/python3.9/site-packages/h5py/__init__.py:33, in <module>
30 else:
31 raise
---> 33 from . import version
35 if version.hdf5_version_tuple != version.hdf5_built_version_tuple:
36 _warn(("h5py is running against HDF5 {0} when it was built against {1}, "
37 "this may cause problems").format(
38 '{0}.{1}.{2}'.format(*version.hdf5_version_tuple),
39 '{0}.{1}.{2}'.format(*version.hdf5_built_version_tuple)
40 ))
File /opt/conda/envs/scvi-env2/lib/python3.9/site-packages/h5py/version.py:15, in <module>
10 """
11 Versioning module for h5py.
12 """
14 from collections import namedtuple
---> 15 from . import h5 as _h5
16 import sys
17 import numpy
File h5py/h5.pyx:1, in init h5py.h5()
ImportError: /opt/conda/envs/scvi-env2/lib/python3.9/site-packages/h5py/defs.cpython-39-x86_64-linux-gnu.so: undefined symbol: H5Pset_fapl_ros3
Any ideas?
The error was gone after I installed a a slightly newer version of h5py. Does it sound reasonable?
(scvi-env2) jupyter@ph12-new:~$ pip install h5py==3.6.0
Collecting h5py==3.6.0
Downloading h5py-3.6.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.5/4.5 MB 41.3 MB/s eta 0:00:00
Requirement already satisfied: numpy>=1.14.5 in /opt/conda/envs/scvi-env2/lib/python3.9/site-packages (from h5py==3.6.0) (1.22.3)
Installing collected packages: h5py
Attempting uninstall: h5py
Found existing installation: h5py 3.2.1
Uninstalling h5py-3.2.1:
Successfully uninstalled h5py-3.2.1
Successfully installed h5py-3.6.0
Hi Brian. I'm not too sure what is causing this. In this issue, people are saying that they got away with forcing h5py to an older version. But if you can get it to work with the newest version, I'd just use that. Otherwise, feel free to ask away on their github.
OK I'm having another issue now
import scvi
/opt/conda/envs/scvi-env2/lib/python3.9/site-packages/h5py/__init__.py:36: UserWarning: h5py is running against HDF5 1.12.1 when it was built against 1.10.6, this may cause problems
_warn(("h5py is running against HDF5 {0} when it was built against {1}, "
and scanpy doesn't work. So I indeed may try an older version
closing due to inactivity