-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing h5py in python console fails #54643
Comments
Hi @Jibede, thanks for reporting. It seems to me this issue is related to an additional Python package installed by you and not to QGIS itself. Please see also https://trac.osgeo.org/osgeo4w/ticket/459 and h5py/h5py#828. |
Thx for the reply @agiudiceandrea . |
@Jibede, how did you install QGIS and how did you install the h5py Python module? What is the h5py Python module version? Judging form the paths shown in the error messages, it looks like the QGIS installation have mixed path to different Python packages directory in your system: Have you tried if the issue does occur using a new QGIS user profile? |
@agiudiceandrea, first, I tried a pip install in the osgeo4W shell. It was installed in my user directory because I don't have permissions in the install dir in program files directory. The issue occurs using a new QGIS user profile in both cases, and on a fresh install too. |
The h5py version installed with pip is 3.9.0 |
@Jibede, you need to install the python3-h5py package provided by OSGeo4W using the OSGeo4W Setup program. |
@agiudiceandrea ok I'll try this and let you know the results. |
What is the bug or the crash?
Console Python
Utilisez iface pour accéder à l'interface API QGIS ou tapez help(iface) pour plus d'informations
Avertissement de sécurité : la saisie de commandes provenant d'une source non fiable peut nuire à votre ordinateur
import h5py
Traceback (most recent call last):
File "C:\PROGRA
1\QGIS321.0\apps\Python39\lib\code.py", line 90, in runcodeexec(code, self.locals)
File "", line 1, in
File "C:\PROGRA
1/QGIS321.0/apps/qgis/./python\qgis\utils.py", line 888, in _importmod = builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\dodeur\AppData\Roaming\Python\Python39\site-packages\h5py_init.py", line 33, in
from . import version
File "C:\PROGRA
1/QGIS321.0/apps/qgis/./python\qgis\utils.py", line 888, in _importmod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\dodeur\AppData\Roaming\Python\Python39\site-packages\h5py\version.py", line 15, in
from . import h5 as _h5
File "C:\PROGRA
1/QGIS321.0/apps/qgis/./python\qgis\utils.py", line 888, in _importmod = _builtin_import(name, globals, locals, fromlist, level)
File "h5py\h5.pyx", line 1, in init h5py.h5
File "C:\PROGRA
1/QGIS321.0/apps/qgis/./python\qgis\utils.py", line 888, in _importmod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: DLL load failed while importing defs: La procédure spécifiée est introuvable.
Steps to reproduce the issue
open QGIS, python console :
import h5py
Versions
3.10, 3.16, 3.28, 3.32
Supported QGIS version
New profile
Additional context
I tried to reopen this issue : #29439 but did not managed.
The text was updated successfully, but these errors were encountered: