Version 1 (modified by toby, 20 months ago) (diff) |
---|
Installing a Native "Apple Silicon" GSAS-II Version on MacOS
After something like 4 months of occasional trial and much error, I was finally able to get GSAS-II to run on a ARM Mac running 11.2.3.
As of right now (6/24/21), Anaconda is not supporting ARM Macs and the wxpython version of miniforge is broken, so I had to install Python and associated packages with homebrew.
Installing Homebrew
See this page. Note that access to a Admin level account is a requirement for this. Use these steps:
- Install command line tools. Use command:
xcode-select --install
- Log into a admin account (I used su admin in a terminal)
- Install homebrew using command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- To add brew to path, use command:
eval "$(/opt/homebrew/bin/brew shellenv)"
Install stuff with brew
Brew is used to install a bunch of things. Here are the commands I used:
brew install svn brew install python brew install scipy brew install wxpython
Install more stuff with pip
python3 -m pip install -U matplotlib python3 -m pip install -U pyopengl
Install GSAS-II
mkdir ~/GSASII cd ~/GSASII curl https://subversion.xray.aps.anl.gov/pyGSAS/install/bootstrap.py -o bootstrap.py python3 bootstrap.py
Compiling GSAS-II fortran routines
You probably do not need this. There is now a set of M1 (ARM aka Apple Silicon) binaries in
This was fairly hard and I don't know what steps were required in retrospect. Also, it might have been better to use brew install gfortran scons rather than using miniforge to install gfortran. (I downloaded https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh from Miniforge3-MacOSX-arm64 link on https://github.com/conda-forge/miniforge
bash ~/Downloads/Miniforge3-MacOSX-arm64.sh source /Users/toby/miniforge3/bin/activate conda create -n buildg10.2 gfortran=10.2 gfortran_impl_osx-arm64=10.2 scons numpy
I installed all of Xcode to get file headers, but that may not have been needed. I had a lot of problems getting gcc to find them, but that should now be changed in Sconstruct