Libhdf5.dylib not found running cadet-cli

Hi all,

I am getting the attached error. Kindly help me to rectify the error.

Hey naveen567,

The error message tells us that the system is looking for the file libhdf5.200.dylib. It also tells us all the locations it has tried.

You can also search for the file: In the terminal, type

find / -iname 'libhdf5.200.dylib'

This may take some time. Please post the results of that search here.
Please also search for libhdf5.dylib by running

find / -iname 'libhdf5.dylib'

Possible causes for this problem could be:

  • You don’t have HDF5 installed (e.g., copying the cadet-cli program to a different computer)
  • The HDF5 version has changed / does not match the version CADET was compiled against
  • HDF5 has been moved to a different location

Hi s.leweke.

Thank you for your response.

Hereby, I have attached the results.


find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
find: /dev/fd/6: Not a directory


find: /Users/naveenj/.Trash: Operation not permitted
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
find: /dev/fd/6: Not a directory


I guess, this is the one that was used to compile CADET:

I suggest adding

import os
if 'DYLD_LIBRARY_PATH' in os.environ:
    os.environ['DYLD_LIBRARY_PATH'] = '/opt/homebrew/lib/:' + os.environ['DYLD_LIBRARY_PATH']
    os.environ['DYLD_LIBRARY_PATH'] = '/opt/homebrew/lib/'

to the top of your Python script / code.

This will add the path /opt/homebrew/lib/ to the DYLD_LIBRARY_PATH environment variable, which is used by the dynamic linker to find missing .dylib files.

Thanks, s.leweke,

I have tried.

I am getting the below error.

CompletedProcess(args=[PosixPath('/Users/naveenj/opt/cadet/bin/cadet-cli'), '/Users/naveenj/noefbq0h.h5'], returncode=-6, stdout=b'', stderr=b"dyld[9122]: Library not loaded: @rpath/libhdf5.200.dylib\n  Referenced from: <2F2F5997-E412-3097-AAE1-FE40BF043393> /Users/naveenj/opt/cadet/bin/cadet-cli\n  Reason: tried: '/opt/homebrew/lib//libhdf5.200.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/naveenj/opt/cadet/bin/../lib/libhdf5.200.dylib' (no such file), '/Users/naveenj/opt/cadet/bin/../lib/libhdf5.200.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS@rpath/libhdf5.200.dylib' (no such file), '/Users/naveenj/opt/cadet/bin/../lib/libhdf5.200.dylib' (no such file), '/Users/naveenj/opt/cadet/bin/../lib/libhdf5.200.dylib' (no such file), '/usr/local/lib/libhdf5.200.dylib' (no such file), '/usr/lib/libhdf5.200.dylib' (no such file, not in dyld cache)\n")
TypeError                                 Traceback (most recent call last)
~/ipykernel_9064/ in <cell line: 1>()
----> 1 p_1=Simulation1C(0.2,3)
      2 p_2=Simulation1C(0.78,3)
      3 p_3=Simulation1C(0.42,3)
      4 p_4=Simulation1C(1.5,4.5)
      5 p_5=Simulation1C(2.5,2.25)

~/ipykernel_9064/ in Simulation1C(c0, vel)
     13     time = model.root.output.solution.solution_times
---> 15     c = c0*model.root.output.solution.unit_001.solution_outlet/(model.root.input.model.unit_000.sec_000.const_coeff)
     16     #Set breakthrogh percentage to calculate loading time in minutes
     17     pstart = 3.49

TypeError: unsupported operand type(s) for *: 'float' and 'Dict'

Kindly help me to rectify the error.

Okay, that’s weird. It seems like your system is kind-of thrown together?
The file /opt/homebrew/lib//libhdf5.200.dylib was compiled for arm64 architecture (i.e., Macs with M1 or M2 CPU), but your system needs x86_64 architecture (i.e., it has an Intel CPU).
Maybe someone has taken the hard drive from an M1/M2 Mac and put it into your Intel Mac?

Anyway, there might be a smart solution, but I suggest the sledgehammer:

  • Uninstall homebrew
  • Install homebrew for your system / CPU
  • Install hdf5 via brew install hdf5
  • Maybe compile CADET again (if HDF5 version has changed)

No, I am using an M1 mac. But the cadet folder I am using is not compatible with mac M1. Could you pls tell me how to install CADET on Mac M1?

Kindly help me with the above.


Hi S. Leweke

Thank you so much for your assistance. I have reconstructed the cadet using the source code, which functions well. Thanks again.