The AFNI runs well in my Mac these years, but today I failed to open it. The message I got is
dyld: Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python
Referenced from: <26DA12DA-0443-38B4-B654-35E18239BCCF> /Users/yangjj/abin/afni
Reason: tried: '/System/Library/Frameworks/Python.framework/Versions/2.7/Python' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/System/Library/Frameworks/Python.framework/Versions/2.7/Python' (no such file), '/System/Library/Frameworks/Python.framework/Versions/2.7/Python' (no such file, not in dyld cache), '/Library/Frameworks/Python.framework/Versions/2.7/Python' (no such file)
The macOS version is Ventura 13.5.2. The AFNI I installed is in Dec. 2017 (it works)
How could I solve this problem?
Can you please copy+paste the output of:
Note that if your system really is using an AFNI version from 6 years ago (!), I think one recommendation will surely be to update it.
Thanks for the reply.
The output of the command you mentioned is:
env: python: No such file or directory
So what I should do it to update the AFNI to a newest version, and the python will be solved. Is it correct?
That is odd. I'm curious, in upgrading to macOS 13, did you do a clean install, or update from version-to-version?
And what is the output of:
No, I did not do anything when the OS system is automatically upgraded.
There is no output of "which python". Please see the below. Something I did wrong?
yangjjs-iMac:~ yangjj$ afni_system_check.py -check_all
env: python: No such file or directory
yangjjs-iMac:~ yangjj$ which python
That makes it look like "python" is not recognized at all; I guess it is only "python3" that is recognized there? So,
... probably outputs a path to something?
I think the isseu is that
python is no longer recognized, and instead just
python3 is. The AFNI Python programs do essentially all run in Python v3, but they also work in Python v2 still, as well, and are referenced by calls to a general "python" environment, rather than just "python3".
So, there are different ways to navigate this. I personally find the most convenient to be to use conda/miniconda to install a Python environment in which
python is still recognized. No root/sudo permission is needed, and you can add all the additional Python modules/packages you want/need as well. We have instructions for this here:
... and I would pick a Python ver=3 environment to set up from one of those recipes and install that.
yangjjs-iMac:~ yangjj$ which python3
It seems that python3 is available. In this case should I follow the linked instruction to set up the python environment?
Yes, I think setting up a conda environment will be the easiest for managing the Python stuff.
OK. I'll try it out. Thank you very much for the help.
Note that the python link you have having trouble with is no longer part of the mac builds. Your AFNI package is about 6 years old now. so it might be worth upgradeing.
If you are ready to upgrade, first make a copy of your current binaries (since you are reasonably happy with them), then go through some of the install steps for mac 12 Intel systems. The install process will lead you to install homebrew libraries and then compile AFNI locally.
Another choice might be to try our macos_12_x86_64 binary package. But that package would still depend on homebrew.
Thanks a lot for the response. Long time no see. Hope everything goes well with you.
I'll try to figure out the install stuff. Seems takes some time, but will be done. I'll let you and Taylor know when the new AFNI works.
It is great to hear from you Jionngjiong, I hope all is well!
Dear Rick and Taylor,
Just let you know that after my colleague helps me to install new python, the old AFNI works well. In this case, I'll let it be till it is too old to work.
We try not to break things retrospectively. However, without updating, you will be missing out on many new features (like the afni_proc.py QC HTML, just for one) that we have developed and the fixes that we have added in over the past few years.