Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

importError: DLL load failed(import h5py)

Tags:

python

qgis

h5py

I installed the OSGeo4W package to use h5py on a Windows environment.

I used OSGeo shell to install h5py using pip install.

C:\Users\Public\Desktop\OSGeo4W>pip install h5py

When I open QGIS and go to the Python Console in QGIS I get this error:

import h5py
Traceback (most recent call last):
File "", line 1, in 
File "C:/OSGEO41/apps/qgis/./python\qgis\utils.py", line 607, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\OSGEO41\apps\Python27\lib\site-packages\h5py_init_.py", line 43, in 
from . import h5a, h5d, h5ds, h5f, h5fd, h5g, h5r, h5s, h5t, h5p, h5z
File "C:/OSGEO41/apps/qgis/./python\qgis\utils.py", line 607, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "h5py\h5p.pxd", line 16, in init h5py.h5a (D:\Build\h5py\h5py-2.7.0\h5py\h5a.c:6968)
File "C:/OSGEO41/apps/qgis/./python\qgis\utils.py", line 607, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: DLL load failed: ÁöÁ¤µÈ ÇÁ·Î½ÃÀú¸¦ ãÀ» ¼ö ¾ø½À´Ï´Ù.

I don't know how can use h5py in QGIS python console

like image 345
Kyungdong Kim Avatar asked Oct 30 '22 05:10

Kyungdong Kim


1 Answers

Check this https://github.com/h5py/h5py/issues/828 . If you install using

pip install h5py

import h5py

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python27\lib\site-packages\h5py\__init__.py", line 43, in <module>
    from . import h5a, h5d, h5ds, h5f, h5fd, h5g, h5r, h5s, h5t, h5p, h5z
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "h5py\h5p.pxd", line 16, in init h5py.h5a (D:\Build\h5py\h5py-2.7.0\h5py\h5a.c:6968)
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: DLL load failed: No se encontró el proceso especificado.

Then, first time you need unistall this package using from OSgeo shell

pip uninstall h5py

For use it ,need intall it from Osgeo4W , advanced installation and install this python-h5py when restart QGIS ,try again import h5py and voilà!.

enter image description here

like image 50
Fran Raga Avatar answered Nov 15 '22 06:11

Fran Raga