运行 CellBender 时出错 - h5py falis 加载 DLLs

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

我已经按照here文档中的安装步骤进行操作。当我运行 cellbender 时,我看到以下 Error,请检查并建议什么可能是正确的修复:

(CellBender) C:\Users\user12\Desktop\cellbender_test>cellbender remove-background --input C:\Users\user12\Desktop\feature_bc_matrix.h5 --output C:\Users\user12\Desktop\output.h5 --cuda --expected-cells 5000 --total-droplets-included 20000 --fpr 0.01 --epochs 150
Traceback (most recent call last):
  File "C:\Users\user12\AppData\Local\anaconda3\envs\CellBender\Scripts\cellbender-script.py", line 33, in <module>
    sys.exit(load_entry_point('cellbender', 'console_scripts', 'cellbender')())
  File "c:\users\user12\desktop\cellbender_test\cellbender\cellbender\base_cli.py", line 91, in main
    cli_dict = generate_cli_dictionary()
  File "c:\users\user12\desktop\cellbender_test\cellbender\cellbender\base_cli.py", line 52, in generate_cli_dictionary
    module_cli = importlib.import_module('.'.join(module_cli_str_list))
  File "C:\Users\user12\AppData\Local\anaconda3\envs\CellBender\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "c:\users\user12\desktop\cellbender_test\cellbender\cellbender\remove_background\cli.py", line 4, in <module>
    from cellbender.remove_background.data.dataset import SingleCellRNACountsDataset
  File "c:\users\user12\desktop\cellbender_test\cellbender\cellbender\remove_background\data\dataset.py", line 10, in <module>
    import anndata
  File "C:\Users\user12\AppData\Local\anaconda3\envs\CellBender\lib\site-packages\anndata\__init__.py", line 7, in <module>
    from ._core.anndata import AnnData
  File "C:\Users\user12\AppData\Local\anaconda3\envs\CellBender\lib\site-packages\anndata\_core\anndata.py", line 17, in <module>
    import h5py
  File "C:\Users\user12\AppData\Local\anaconda3\envs\CellBender\lib\site-packages\h5py\__init__.py", line 33, in <module>
    from . import version
  File "C:\Users\user12\AppData\Local\anaconda3\envs\CellBender\lib\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: DLL load failed: The specified procedure could not be found.

我尝试安装 h5py - 3.6.0 和 3.1.0 这些版本都不适用于我的情况。另外,我打印了导入路径并从 h5py 复制了相应的文件,仍然没有运气。

python-3.x anaconda h5py
1个回答
0
投票

当您尝试同时使用 pytables 和 h5py 时,这是令人恼火的事情之一。他们都使用 HDF5 库/dll。当他们使用不同的版本时,您会收到该错误消息。我的系统上有同样的问题(所以我可以复制错误)。首先,检查您系统上的版本。

检查 h5py 的 HDF5 版本:

import h5py
print(h5py.version.info)

## Partial output from my system:
Summary of the h5py configuration
---------------------------------    
h5py    3.3.0
HDF5    1.12.0
Python  3.8.3 (default, May 19 2020, 06:50:17)

检查 pytables 的 HDF5 版本:

import tables as tb
print(tb.__version__)
print(tb.hdf5_version)
## Output from my system:
3.6.1
1.10.6

如您所见,我的两个包之间存在 HDF5 库不匹配(h5py 为 1.12.0,pytables 为 1.10.6)。我怀疑您将 h5py 作为 pytorch 的一部分。 (它支持 HDF5 文件。)解决方案是在 pytorch 中安装与 h5py 相同的 HDF5 版本的 pytables 版本。

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