python-3.x 运行CellBender -h5 py falis加载DLL时出错

j9per5c4  于 2023-03-24  发布在  Python
关注(0)|答案(1)|浏览(185)

我已经按照安装步骤参考文档here.当我运行cellbender,我看到以下 * 错误 *,请检查并建议什么可能是正确的修复这里:

(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.

我试着安装h5 py- 3.6.0和3.1.0,这些版本在我的情况下都不起作用。此外,我打印出导入路径并从 * h5 py * 复制相应的文件,仍然没有运气。

cgfeq70w

cgfeq70w1#

当你同时使用pytables和h5 py时,这是一个令人恼火的事情。它们都使用HDF 5库/dll。当它们使用不同的版本时,你会得到错误消息。我的系统上也有同样的问题(所以我可以复制错误)。首先,检查系统上的版本。

检查h5 py的HDF 5版本:

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的HDF 5版本:

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

正如你所看到的,我在两个包之间有一个HDF 5库不匹配(h5 py的1.12.0和pytables的1.10.6)。我怀疑你是把h5 py作为pytorch的一部分。(它支持HDF 5文件。)解决方案是在pytorch中安装一个与h5 py具有相同HDF 5版本的pytables版本。

相关问题