Borrar filtros
Borrar filtros

Reading HDF5 with dynamic filters

32 visualizaciones (últimos 30 días)
Ben Dichter
Ben Dichter el 20 de Mzo. de 2022
Respondida: Ninad el 19 de En. de 2024
I am trying to read an HDF5 file that uses a zstd filter, and I am having trouble setting the HDF5_PLUGIN_PATH variable. Here is what I have tried:
>> !export HDF5_PLUGIN_PATH=/Users/bendichter/opt/miniconda3/lib/python3.9/site-packages/hdf5plugin/plugins
>> !echo $HDF5_PLUGIN_PATH
/Users/bendichter/opt/miniconda3/lib/python3.9/site-packages/hdf5plugin/plugins
>> setenv("HDF5_PLUGIN_PATH", "/Users/bendichter/opt/miniconda3/lib/python3.9/site-packages/hdf5plugin/plugins")
>> getenv("HDF5_PLUGIN_PATH")
'/Users/bendichter/opt/miniconda3/lib/python3.9/site-packages/hdf5plugin/plugins'
>> h5read("zstd.h5","/data")
Error using h5readc
The HDF5 library encountered an error and produced the following stack trace information:
H5PL__find_plugin_in_path can't open directory: /usr/local/hdf5/lib/plugin
Error in h5read (line 93)
[data,var_class] = h5readc(Filename,Dataset,start,count,stride);
Why is MATLAB looking in /usr/local/hdf5/lib/plugin? That directory does not exist, and I have tried two different ways to tell MATLAB to look an a different directory. What am I doing wrong?
  4 comentarios
Ben Dichter
Ben Dichter el 23 de Mzo. de 2022
@Benjamin Thompson so do you have any ideas how I might fix this? I am not trying to read a .mat file
Science Machine
Science Machine el 18 de Abr. de 2023
try loading path before starting matlab?

Iniciar sesión para comentar.

Respuestas (1)

Ninad
Ninad el 19 de En. de 2024
Hi Ben,
As per my understanding you want to read an HDF5 file in MATLAB and you are unable to set HDF5_PLUGIN_PATH variable using the "setenv()" function.
Please go through the latest version of MATLAB documentation "Import HDF5 Files":
It clearly states that you need to set the HDF5_PLUGIN_PATH environment variable to the folder containing the installed plugin binary file before you start MATLAB.
On Windows® — Set the environment variable using System Properties > Advanced > Environment Variables, and then start MATLAB.
Hope this helps.
Regards
Ninad

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by