-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Installation via metapackage doesn't come with appropriate libpng on Silicon Mac #205
Comments
Assuming we can't install libpng via PyPI (?), are the options:
Anything I'm missing? |
I think that's right. This also prohibits the installation of the metapackage on silicon macs. My local experiments suggest that |
Just FYI I think |
Do you mean Have you tried |
I mean niftyreg, that should get around the qt issue, as it fetches niftyreg (and libpng), but without any qt issues. Until the metapackage is on conda, we should probably suggest:
|
Describe the bug
brainreg
should be useable on all platforms when installed via the metapackage on PyPI. Local installation on M2 Mac seems successful, but running the CLI on sample data fails by not finding thelibpng
dynamic library.To Reproduce
Run this bash script on a Silicon Mac, adapting paths to
conda
/mamba
and to sample data from GIN.For me this results in:
Full relevant stack trace:
```bash subprocess.CalledProcessError: Command '/Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainreg/core/bin/nifty_reg/osX/reg_aladin -ln 6 -lp 5 -flo "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/brain_filtered.nii" -ref "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/downsampled_filtered.nii" -aff "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/affine_matrix.txt" -res "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/affine_registered_atlas_brain.nii" -omp 6' died with .During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainreg/core/backend/niftyreg/registration.py", line 67, in register_affine
safe_execute_command(
File "/Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainglobe_utils/general/system.py", line 407, in safe_execute_command
raise SafeExecuteCommandError(
brainglobe_utils.general.system.SafeExecuteCommandError:
Process failed:
dyld[65993]: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: <25F3C636-D4F1-34C5-BF80-7A736D353377> /Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainreg/core/bin/nifty_reg/osX/reg_aladin
Reason: tried: '/usr/local/opt/libpng/lib/libpng16.16.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libpng/lib/libpng16.16.dylib' (no such file), '/usr/local/opt/libpng/lib/libpng16.16.dylib' (no such file), '/usr/local/lib/libpng16.16.dylib' (no such file), '/usr/lib/libpng16.16.dylib' (no such file, not in dyld cache)
please read the logs at /Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/affine.log and /Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/affine.err
command: /Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainreg/core/bin/nifty_reg/osX/reg_aladin -ln 6 -lp 5 -flo "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/brain_filtered.nii" -ref "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/downsampled_filtered.nii" -aff "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/affine_matrix.txt" -res "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/affine_registered_atlas_brain.nii" -omp 6
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/bin/brainreg", line 8, in
sys.exit(main())
File "/Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainreg/core/cli.py", line 288, in main
register(
File "/Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainreg/core/main.py", line 65, in main
run_niftyreg(
File "/Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainreg/core/backend/niftyreg/run.py", line 105, in run_niftyreg
brain_reg.register_affine()
File "/Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainreg/core/backend/niftyreg/registration.py", line 73, in register_affine
raise RegistrationError(
brainreg.core.backend.niftyreg.registration.RegistrationError: Affine registration failed;
Process failed:
dyld[65993]: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: <25F3C636-D4F1-34C5-BF80-7A736D353377> /Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainreg/core/bin/nifty_reg/osX/reg_aladin
Reason: tried: '/usr/local/opt/libpng/lib/libpng16.16.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libpng/lib/libpng16.16.dylib' (no such file), '/usr/local/opt/libpng/lib/libpng16.16.dylib' (no such file), '/usr/local/lib/libpng16.16.dylib' (no such file), '/usr/lib/libpng16.16.dylib' (no such file, not in dyld cache)
please read the logs at /Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/affine.log and /Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/affine.err
command: /Users/alessandrofelder/mambaforge/envs/brainreg-metapackage/lib/python3.10/site-packages/brainreg/core/bin/nifty_reg/osX/reg_aladin -ln 6 -lp 5 -flo "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/brain_filtered.nii" -ref "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/downsampled_filtered.nii" -aff "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/affine_matrix.txt" -res "/Users/alessandrofelder/Downloads/brainreg-metapackage-output/niftyreg/affine_registered_atlas_brain.nii" -omp 6
The text was updated successfully, but these errors were encountered: