conda - 在 conda 上导入 h5/h5py 时出错 : undefined symbol: H5Pget_fapl_direct

标签 conda h5py

我使用以下方式安装了 h5py:

conda安装h5py pip安装h5py

以下软件包已安装在我的 conda 环境中:

h5                        0.5.2                    pypi_0    pypi
h5py                      3.7.0           nompi_py310h06dffec_100    conda-forge

但是当我尝试导入 h5 时收到错误:

Traceback (most recent call last):
File "/vol/ideadata/oc69ubiw/Explainer_GNN/patho-quant-explainer/core/generate_cell_graphs.py", line 14, in <module>
  from histocartography.preprocessing import (
File "/vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/histocartography/__init__.py", line 1, in <module>
from .pipeline import PipelineRunner, BatchPipelineRunner
File "/vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/histocartography/pipeline.py", line 12, in <module>
 import h5py
File "/vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/h5py/__init__.py", line 33, in <module>
from . import version
File "/vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/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: /vol/ideadata/oc69ubiw/conda/pathoexplainer/lib/python3.10/site-packages/h5py/defs.cpython-310-x86_64-linux-gnu.so: undefined symbol: H5Pget_fapl_direct

最佳答案

为我工作:

pip uninstall h5py
pip install --no-cache-dir h5py

关于conda - 在 conda 上导入 h5/h5py 时出错 : undefined symbol: H5Pget_fapl_direct,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73420378/

相关文章:

python - 如何使用 h5py 更新二维数组?

azure - 如何在 Azure ML 中重用成功构建的 docker 镜像?

anaconda - 为什么 conda update 会降级一些库

python - 运行 'conda init'后关闭并重启shell

python - 将 hdf5 文件组合成单个数据集

arrays - 可见的弃用警告...?

python - h5py:如何读取 hdf5 文件的选定行?

python - 使用 Conda Build 时导入测试失败

python - VS Code Intellisense 不适用于 Conda Python 环境

python - 有没有办法获取存储在 hdf5 文件中的数组切片的 numpy 样式 View ?