HI, I was trying to run Python script with MRIcroGL, but every time I click run, or cmd+r, the whole application would dispear. I tried using sample script and reinstall MRIcroGL, but it still cannot run scriprt. BTW, I was running it on MacOS Sonoma with a M1 chip.
Are you running the beta Sonoma as your primary operating system, or are you running it as a virtualized operating system? I know that virtualized systems can not support MRIcroGL or FSLeyes yet, but I had assumed a primary operating system will support Sonoma.
One alternative is to use the MRIcroMTL version. This uses Metal instead of OpenGL so it is in theory an more optimized solution, albeit it does not support all the features.
https://github.com/rordenlab/MRIcroGL/releases/tag/v1.2.20210317
Originally posted by Chris Rorden:
Are you running the beta Sonoma as your primary operating system, or are you running it as a virtualized operating system? I know that virtualized systems can not support MRIcroGL or FSLeyes yet, but I had assumed a primary operating system will support Sonoma.
One alternative is to use the MRIcroMTL version. This uses Metal instead of OpenGL so it is in theory an more optimized solution, albeit it does not support all the features.
https://github.com/rordenlab/MRIcroGL/releases/tag/v1.2.20210317
Thank you for your response. Yes I'm using Sonoma as primary system. I tried using MRIcroMTL but sadly it still cannot run script. So I tried using python to launch MRIcroGL with my script. It raised errors messages as follows
Fatal Python error: initsite: Failed to import the site module
Error processing line 1 of /Users/cz/.local/lib/python3.7/site-packages/google_auth-1.30.1-py3.9-nspkg.pth:
Traceback (most recent call last):
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'types'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 579, in <module>
main()
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 565, in main
known_paths = addusersitepackages(known_paths)
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 315, in addusersitepackages
addsitedir(user_site, known_paths)
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 207, in addsitedir
addpackage(sitedir, name, known_paths)
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 178, in addpackage
import traceback
ModuleNotFoundError: No module named 'traceback'
So I tried removing the google_auth-1.30.1-py3.9-nspkg.pth but same erros appered with protobuf-3.17.1-py3.7-nspkg.pth. I removed it too. Then it works! I can run Python script with MRIvroGL now! But thank you anyway for your kind help!
I have added an experimental solution named "MRIcroMTLforMacOS_Sonoma.zip" that you can download from here:
https://github.com/rordenlab/MRIcroGL/releases/tag/v1.2.20220720
I have noticed two small issues:
1. The application menu with the Settings and Quit menu items is not displayed.
2. If you choose the "Multiplanar (A+C+S+R)" item from the "Display" item, you may seem some transient artifacts when you click on the rendering.
Tell me if you find any other issues.
Please update to the stable final release of MacOS Sonoma. On my M1 computer the recent versions of MRIcroGL and Surfice work fine with scripting.