HDF5 通过 Conda 安装,但是找不到 `hdf5` 位置

问题描述 投票:0回答:1

我正在尝试安装最新版本的 HDF5 1.12.1(通过

conda
)和 h5py 3.6.0(通过
pip3
)。

两个包都通过最新版本的 Conda 安装成功,但我的环境不包含 HDF5.

h5py

# This was succesfully installed and found in the correct directory
pip3 show h5py

    Name: h5py\
    Version: 3.6.0 \
    Summary: Read and write HDF5 files from Python\
    Home-page: http://www.h5py.org \
    Author: Andrew Collette\
    Author-email: [email protected] \
    License: BSD\
    Location: /home/goldpm1/miniconda3/envs/cnvpytor/lib/python3.7/site-packages\
    Requires: cached-property, numpy\
    Required-by: CNVpytor, selene-sdk, signatureanalyzer

HDF5

# conda list shows that hdf5 newest version is insatalled, but I can't find at all at the conda environment
conda list hdf5
     
Name             Version                   Build        Channel
hdf5              1.12.1      nompi_h4df4325_104    conda-forge

# I can't find actual hdf5 location in /home/goldpm1/miniconda3/envs/cnvpytor
which hdf5

    /usr/bin/which: no hdf5 in (............)

我的康达发生了什么事?我该如何解决我的问题?

python conda hdf5 h5py miniconda
1个回答
0
投票

我建议使用

hyp5
的 Conda 版本,因为管理完整的依赖项堆栈正是创建 Conda 来解决的问题。也就是说,Conda 将保证安装正确的依赖项:

conda install h5py

此外,我不确定为什么需要

hdf5
二进制文件。
hdf5
包提供了一堆
bin/h5*
二进制文件,但没有
hdf5
。此外,Python 包使用
include/*.h
标头,然后调用
lib/libhdf5.{so,dylib,dll}
,而不是
hdf5
二进制文件。

我可能还应该提到,至少对于最新版本,

h5py
在 PyPI 上通过轮子捆绑 HDF5,即使用静态构建。相比之下,Conda 包大多使用动态链接,因此包可以共享依赖项的单个副本。此外,Conda 使用硬链接,因此依赖项甚至可以是单个副本跨环境.

© www.soinside.com 2019 - 2024. All rights reserved.