簡體   English   中英

無法安裝 H5PY - 未找到 HDF5.dll 依賴項

[英]Can't install H5PY - HDF5.dll dependency not found

我正在嘗試安裝一個依賴於 h5py 的庫。 但是,當我嘗試安裝它時,出現此錯誤:

使用緩存的 h5py-3.1.0.tar.gz 收集 h5py (371 kB) 安裝構建依賴項 ... 完成 獲取構建輪子的要求 ... 完成 安裝后端依賴項 ... 完成 准備輪子元數據 ... 完成 收集降價> =2.6.8 使用緩存的 Markdown-3.3.3-py3-none-any.whl (96 kB) 收集 werkzeug>=0.11.10 使用緩存的 Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB) ) 要求已經滿足,跳過升級:setuptools in c:\\users\\user\\desktop\\projects\\python\\mlagents\\venv\\lib\\site-packages (來自 protobuf>=3.6.1-tensorflow==1.12.0) (50.3 .2) 對 termcolor 使用舊版“setup.py install”,因為未安裝包“wheel”。 為收集的包構建輪子:h5py 為 h5py 構建輪子(PEP 517)...錯誤錯誤:命令出錯,退出狀態為 1:命令:'c:\\users\\user\\desktop\\projects\\python\\mlagents\\venv\\scripts \\python.exe''c:\\users\\user\\desktop\\projects\\python\\mlagents\\venv\\lib\\site-packages\\pip_vendor\\pep517_in_process.py' build_wheel 'C:\\Users\\USER\\AppData\\Local\\Temp\\ tmpf62jt8ch' cwd: C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-7diegpjl\\h5py 完整輸出(70行):運行bdist_wheel運行構建運行構建_py創建構建創建構建\\lib.win32-3.8創建構建\\ lib.win32-3.8\\h5py 復制 h5py\\h5py_warnings.py -> build\\lib.win32-3.8\\h5py 復制 h5py\\ipy_completer.py -> build\\lib.win32-3.8\\h5py 復制 h5py\\version.py -> build \\lib.win32-3.8\\h5py 復制 h5py_ init _.py -> build\\lib.win32-3.8\\h5py 創建 build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\attrs.py -> build\\lib.win32-3.8 \\h5py_hl 復制 h5py_hl\\base.py -> build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\compat.py -> build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\dataset.py -> build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\datatype.py -> build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\dims.py - > build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\files.py -> build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\filters.py -> build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\group.py -> build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\selections.py -> build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\selections2.py -> build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl\\vds. py -> build\\lib.win32-3.8\\h5py_hl 復制 h5py_hl_ init _.py -> build\\lib.win32-3.8\\h5py_hl 創建 build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\common.py - > build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\conftest.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_attribute_create.py -> build\\lib.win32-3.8 \\h5py\\tests 復制 h5py\\tests\\test_attrs.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_attrs_data.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5 py\\tests\\test_base.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_big_endian_file.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_completions.py - > build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_dataset.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_dataset_getitem.py -> build\\lib.win32-3.8 \\h5py\\tests 復制 h5py\\tests\\test_dataset_swmr.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_datatype.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests \\test_dimension_scales.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_dims_dimensionproxy.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_dtype.py -> build\\ lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_errors.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_file.py -> build\\lib.win32-3.8\\h5py\\測試復制 h5py\\tests\\test_file2.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_file_image.py -> build\\lib.win32-3.8\\h5py\\tests copyi ng h5py\\tests\\test_filters.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_group.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_h5.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_h5d_direct_chunk.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_h5f.py -> build\\lib.win32- 3.8\\h5py\\tests 復制 h5py\\tests\\test_h5p.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_h5pl.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\ tests\\test_h5t.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_objects.py -> build\\lib.win32-3.8\\h5py\\tests 復制 h5py\\tests\\test_selections.py -> 構建\\lib.win32-3.8\\h5py\\tests 復制h5py\\tests\\test_slicing.py -> build\\lib.win32-3.8\\h5py\\tests 復制h5py\\tests_ init _.py -> build\\lib.win32-3.8\\h5py \\tests 創建 build\\lib.win32-3.8\\h5py\\tests\\data_files 復制 h5py\\tests\\data_files_ init _.py -> build\\lib.win32-3.8\\h5py\\tests\\data_files 創建 build\\lib.win32-3.8\\ h5py\\tests\\test_vds 復制 g h5py\\tests\\test_vds\\test_highlevel_vds.py -> build\\lib.win32-3.8\\h5py\\tests\\test_vds 復制 h5py\\tests\\test_vds\\test_lowlevel_vds.py -> build\\lib.win32-3.8\\h5py\\tests\\tests復制 h5py\\tests\\test_vds\\test_virtual_source.py -> build\\lib.win32-3.8\\h5py\\tests\\test_vds 復制 h5py\\tests\\test_vds_ init _.py -> build\\lib.win32-3.8\\h5py\\tests\\test_vds復制 h5py\\tests\\data_files\\vlen_string_dset.h5 -> build\\lib.win32-3.8\\h5py\\tests\\data_files 復制 h5py\\tests\\data_files\\vlen_string_dset_utc.h5 -> build\\lib.win32-3.8\\h5py\\filesdata復制 h5py\\tests\\data_files\\vlen_string_s390x.h5 -> build\\lib.win32-3.8\\h5py\\tests\\data_files running build_ext 加載庫以獲取版本:hdf5.dll 錯誤:無法加載依賴項 HDF5,請確保正確安裝了 HDF5錯誤:找不到模塊“hdf5.dll”。 嘗試使用帶有構造函數語法的完整路徑。


錯誤:h5py 構建輪子失敗 無法構建 h5py 錯誤:無法為使用 PEP 517 且無法直接安裝的 h5py 構建輪子

我意識到我錯過了 HDF5,但是我找不到合適的方法來安裝它。即使我這樣做了,我也不知道 h5py 想要它的 dll 在哪里才能被讀取。

編輯我正在使用 Python 3.8.0 如果有人想知道我嘗試安裝的庫是 tensorflow。

pip install tensorflow

對我不起作用,所以我使用了 1.14.0 版的直接輪文件

感謝您的幫助:)

我在 Apple Silicon 上使用 Python 3.9 並面臨同樣的錯誤。 我通過以下程序修復它:

  1. brew install hdf5
  2. git clone https://github.com/h5py/h5py
  3. 打開setup_configure.py並修改這一行
- default_path = 'libhdf5.dylib'
+ default_path = '/opt/homebrew/lib/libhdf5.dylib'
  1. H5PY_SETUP_REQUIRES=0 python3 setup.py build
  2. python3 -m pip install . --no-build-isolation

這是因為主要更新(python 3.9)有很多錯誤。 我嘗試在python中安裝opencv模塊,它提示同樣的錯誤,你有兩個選擇;

  1. 你可以下載舊版本的python,比如python 3.8/7,它可以支持H5PY。

  2. 耐心等待python修復所有bug,12月中旬或更早一切都會好起來的。

希望對你有幫助! :)

降級到舊版本的python,直到您可以安裝keras(我想這是您遇到問題的地方)。 從 python 3.8 到 3.7,最后到 3.6.8,我沒有遇到像以前版本那樣的任何錯誤。 不用擔心,因為這個 python 版本支持幾乎所有庫作為最新版本。

這很奇怪,因為我看到人們在比 Python 3.8 更新的版本上安裝 tensorflow .. 但我發現 H5PY 與 python 3.8 不兼容,我需要降級......

但是,我認為這是因為舊版本的 tensorflow 對我有用,但我所做的至少需要 1.14.0 ...

我會嘗試將 python 更多降級(到 python 3.7。)並更新你

編輯

它正在工作。 我正在使用 Python 3.7.2,一切正常! 我什至不需要獲取 tensorflow 的輪文件我可以正常執行 pip install tensorflow 。

感謝所有評論的人:)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM