Embarcadero / python4delphi

Fork of P4D adding FireMonkey wrapper and Android support
MIT License
85 stars 19 forks source link

Error while import a python package called h5py #61

Open minguyen1984 opened 1 year ago

minguyen1984 commented 1 year ago

Good morning, I try to use C++ demo20 to test the import of lib H5PY but I have the following message from console when I execute these lines; "import os import time import copy import numpy as np np.set_printoptions(precision=6, threshold=20, suppress=True, linewidth=100)

import h5py"

Error message is: Traceback (most recent call last): File "", line 7, in File "C:\Anaconda3\lib\site-packages\h5py__init__.py", line 33, in from . import version File "C:\Anaconda3\lib\site-packages\h5py\version.py", line 15, in from . import h5 as _h5 File "h5py\h5.pyx", line 1, in init h5py.h5 ImportError: DLL load failed while importing defs: La procédure spécifiée est introuvable.

Any idea on how to fix it please?

lmbelo commented 1 year ago

Did you set the Python engine correctly?

minguyen1984 commented 1 year ago

Hi @lmbelo, As I used directly the demo20, the engine is set correctly. There is no import issue when I load only "numpy" or with another python package i used. I knew there is an issue with scientific python lib so i applied the function "MaskFPUExceptions(true);".

The problem concerns clearly "h5py".