External Email - Use Caution
Andrew might have a better way to do this, but you could try the following.
Below you should substitute your base path to the freesurfer distribution for where /Applications/freesurfer/dev is used.
1) Setup your freesurfer environment with FREESURFER_HOME and source the setup script, e.g. zsh/bash,
$ export FREESURFER_HOME=/Applications/freesurfer/dev$ source $FREESURFER_HOME/SetUpFreeSurfer.sh... output showing environment deleted ...
2) Download the tensorflow package, tensorflow-2.4.1-py3-none-any.whl, via the link, e.g. into $HOME/Downloadshttps://drive.google.com/file/d/15Qeve5FIA137KON67ehKIOyXy1N0PbAC/view?usp=sharing
3) Uninstall the existing tensorflow,
$ sudo -H /Applications/freesurfer/dev/python/bin/python3 -m pip uninstall tensorflow
4) Install the downloaded tensorflow (this example assumes it is in your default Downloads folder = $HOME/Downloads).
$ sudo -H /Applications/freesurfer/dev/python/bin/python3 -m pip install $HOME/Downloads/tensorflow-2.4.1-py3-none-any.whl
4) Check you have fspython in your path. Then test the import succeeds and exit.$ which fspython/Applications/freesurfer/dev/bin/fspython$ fspython>>> import tensorflow... output deleted ...>>> ^D
On Jul 25, 2022, at 11:27, Hoopes, Andrew <AHOOPES(a)mgh.harvard.edu> wrote:Unfortunately, tensorflow and M1 don’t mix well at the moment. Not sure if there is a universal fix yet. Rob, do you remember where the mac-specific TF package can be installed from? Best,Andrew From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces(a)nmr.mgh.harvard.edu> on behalf of Abdelkarim, Ahmed <a.karam@ucl.ac.uk>Date: Tuesday, July 12, 2022 at 9:29 AMTo: freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu>Subject: [Freesurfer] SynthSR: Illegal Hardware Instruction External Email - Use Caution Hello I have an issue getting SynthSR working with FreeSurfer dev.I have MacBook Pro with apple M1 chip and MacOS Monterey. In bash terminal, after setting up FreeSurfer, and running the SynthSR command, I get this error ‘’Illegal instruction: 4’’. Have you had a similar issue before? Any advice? Many thanks in advance. RegardsAhmed