DLL ImportError for h5py

Issue #868 resolved
Andreas Janz created an issue

h5py is an optional dependency required for reading PRISMA products.

Installing h5py via the EnMAP-Box PIP Package Installer causes problems unter QGIS for Windows.

  1. You need to manually delete the PIP installation of h5py from your user folder, e.g.
    C:\Users\USER\AppData\Roaming\Python\Python39\site-packages\h5py
  2. Run the OSGeo4W Setup and install h5py package:

Comments (17)

  1. Andreas Janz reporter

    In future versions of the EnMAP-Box, the h5py installation via PIP will be blocked:

  2. Giuseppe Colacicco

    I have installed the h5py package since the Osgeo4w Shell setup but when I go to the Appdata folder I can’t find the installed folder and so it always gives me the same error (DLL ImportError for h5py) when I try to convert data to enmapbox.

  3. Giuseppe Colacicco

    As you can see from the second image, it is still the old installation of the h5py package. The newly installed folder from the setup does not appear.

  4. Andreas Janz reporter

    It doesn’t matter. This version of h5py was created by the EnMAP-Box PIP Installer, which causes all the problems. Just delete this folder:

    The OSGeo4W Setup installs h5py into another folder below your QGIS folder, e.g.
    C:\QGIS3.22\apps\Python39\lib\site-packages\h5py

    Now your QGIS should use the correct h5py version. You can check this in the QGIS Python Console:

  5. Giuseppe Colacicco

    Perfect, I managed to solve. I really thank you very much for your help. You were very kind.

  6. Andreas Janz reporter

    You are very wellcome 🙂 .
    And also, solving Python dependencies in QGIS can be very frustrating from time to time 😉

  7. Tom Flipsen

    Hi Andreas,

    I am also struggling with this issue. I have deleted the h5py map from Appdata\Roaming\Python\Python39\site-packages\. Then, I used the OSGeo shell to reïnstall it. I checked it with the Python Console in QGIS:

    Which shows it is installed in the right location. However, when I try to load PRISMA data, I still get an error:

    (QGIS 3.22.3, EnMAP-Box 3 3.920211123T125541)

  8. Gabriele Delogu

    Hi Andreas,

    I have the same problem as Tom Flipsen when I try to load PRISMA data. The source you linked is no longer available. Could you help me in some way?

    Thanks in advance!

    Gabriele

  9. Andreas Rabe

    The source you linked is no longer available.

    Please update to QGIS 3.28, install the EnMAP-Box v3.11 and try again.

  10. Gabriele Delogu

    Ok, I have no more errors by importing PRISMA L2D with QGIS 3.28 and EnMAP-Box v3.11

    Thank you very much for your help!

  11. Log in to comment