@@ -242,18 +242,20 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop, strea
242242 raise (e )
243243
244244
245- _hdf_maxwell_error = """Maxwell file format is based on HDF5.
246- The internal compression requires a custom plugin!!!
247- This is a big pain for the end user.
248- You, as a end user, should ask Maxwell company to change this.
249- Please visit this page and install the missing decompression libraries:
250- https://share.mxwbio.com/d/4742248b2e674a85be97/
251- Then, link the decompression library by setting the `HDF5_PLUGIN_PATH` to your
252- installation location, e.g. via
245+ _hdf_maxwell_error = """The MaxWell file compression requires a custom plugin.
246+ You can use the auto_install_maxwell_hdf5_compression_plugin() function or
247+ (if it fails) install it manually:
248+ Download the missing decompression library:
249+ https://share.mxwbio.com/d/7f2d1e98a1724a1b8b35
250+ Then, link the decompression library by setting the `HDF5_PLUGIN_PATH` to its location,
251+ e.g. directly in Python via:
253252os.environ['HDF5_PLUGIN_PATH'] = '/path/to/custom/hdf5/plugin/'
254-
255- Alternatively, you can use the auto_install_maxwell_hdf5_compression_plugin() below
256- function that do it automagically.
253+ or in your shell via:
254+ export HDF5_PLUGIN_PATH=/path/to/custom/hdf5/plugin/
255+ You can also set the `HDF5_PLUGIN_PATH` environment variable in your shell
256+ configuration file (e.g. .bashrc, .bash_profile, .zshrc, etc.) to make it
257+ permanent.
258+ See https://mxw.bio/MxW_Doc_Installing_Decompression_Library_to_load_MaxLab_Live_Recordings for more details.
257259"""
258260
259261
@@ -267,13 +269,17 @@ def auto_install_maxwell_hdf5_compression_plugin(hdf5_plugin_path=None, force_do
267269 hdf5_plugin_path .mkdir (exist_ok = True )
268270
269271 if platform .system () == "Linux" :
270- remote_lib = "https://share.mxwbio.com/d/4742248b2e674a85be97 /files/?p=%2FLinux%2Flibcompression.so&dl=1"
272+ remote_lib = "https://share.mxwbio.com/d/7f2d1e98a1724a1b8b35 /files/?p=%2FLinux%2Flibcompression.so&dl=1"
271273 local_lib = hdf5_plugin_path / "libcompression.so"
272274 elif platform .system () == "Darwin" :
273- remote_lib = "https://share.mxwbio.com/d/4742248b2e674a85be97/files/?p=%2FMacOS%2Flibcompression.dylib&dl=1"
275+ if platform .machine () == "arm64" :
276+ remote_lib = "https://share.mxwbio.com/d/7f2d1e98a1724a1b8b35/files/?p=%2FMacOS%2FMac_arm64%2Flibcompression.dylib&dl=1"
277+ else :
278+ # Assuming x86_64 for MacOS
279+ remote_lib = "https://share.mxwbio.com/d/7f2d1e98a1724a1b8b35/files/?p=%2FMacOS%2FMac_x86_64%2Flibcompression.dylib&dl=1"
274280 local_lib = hdf5_plugin_path / "libcompression.dylib"
275281 elif platform .system () == "Windows" :
276- remote_lib = "https://share.mxwbio.com/d/4742248b2e674a85be97 /files/?p=%2FWindows%2Fcompression.dll&dl=1"
282+ remote_lib = "https://share.mxwbio.com/d/7f2d1e98a1724a1b8b35 /files/?p=%2FWindows%2Fcompression.dll&dl=1"
277283 local_lib = hdf5_plugin_path / "compression.dll"
278284
279285 if not force_download and local_lib .is_file ():
0 commit comments