pyelastix icon indicating copy to clipboard operation
pyelastix copied to clipboard

elastix on MacOS, dyld: Library not loaded: libANNlib.dylib

Open XiaoWanLINJU opened this issue 7 years ago • 1 comments

I know there is a solution http://elastix.isi.uu.nl/FAQ.php#Q_LibraryNotLoaded But I can not make it work, I can get:echo $DYLD_LIBRARY_PATH /Users/xiaowanli/Desktop/segmentation/softwares/registration/elastix_macosx64_v4.8/lib This means I set the path right, but I still get this errors when I run the example in repo. Any ideas? Here is the full version of error message:

Found elastix version: 4.800 in 'elastix' Calling Elastix to register images ...

dyld: Library not loaded: libANNlib.dylib Referenced from: /Users/xiaowanli/Desktop/segmentation/softwares/registration/elastix_macosx64_v4.8/bin/elastix Reason: image not found

Traceback (most recent call last): File "registration.py", line 30, in im3, field = pyelastix.register(im1, im2, params) File "/anaconda/lib/python3.6/site-packages/pyelastix.py", line 502, in register _system3(command, verbose) File "/anaconda/lib/python3.6/site-packages/pyelastix.py", line 337, in _system3 raise RuntimeError('An error occured during the registration.') RuntimeError: An error occured during the registration.

XiaoWanLINJU avatar Dec 18 '17 18:12 XiaoWanLINJU

Due to security issues, macos restricted DYLD_LIBRARY_PATH. You can disable this restriction by "$ csrutil disable" in recovery mode.

This link may also helpful for you: https://github.com/rbenv/rbenv/issues/962#issuecomment-275858404

acearth avatar Jul 29 '19 15:07 acearth