Changes between Version 3 and Version 4 of MacM1Notes


Ignore:
Timestamp:
May 22, 2022 4:20:39 PM (13 months ago)
Author:
toby
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MacM1Notes

    v3 v4  
    11= Installing a Native "Apple Silicon" GSAS-II Version on MacOS =
    22
    3 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 MacOS 11.2.3.
     3== Conda on M1 Mac ==
    44
    5 As I write this (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 [https://brew.sh homebrew].
     5(May 2022) Thanks to Billy Poon, who fixed the [https://github.com/conda-forge/wxpython-feedstock/issues/74 conda-forge/wxpython bug], conda can now be used to create a working Python for GSAS-II. Note that these instructions do not provide the subversion (svn) program that is usually needed to install GSAS-II, so until this is addressed, svn must be installed by some other method, such as homebrew (see below).
    66
    7 == Installing Homebrew ==
     7Short instructions are below:
     8
     9 1) Download the latest version of miniforge or mambaforge (I recommend mambaforge) from https://github.com/conda-forge/miniforge/releases/latest. The file you will want will be named Mambaforge-<version>-MacOSX-arm64.sh (or Miniforge...)
     10
     11 2) Install Python from the downloaded file using a command in a terminal window similar to this:
     12{{{
     13toby@bht21 % bash ~/Downloads/Mambaforge-4.12.0-0-MacOSX-arm64.sh
     14}}}
     15 (note that your file location and name may vary from this.)
     16
     17 3) The installer will ask you to press Enter or space multiple times to read the license file.
     18
     19      A) You will then need to agree to the terms by typing {{{yes}}}.
     20
     21      B) You will then need to supply a location to install this Python. Enter a name like {{{~/py39}}}.
     22
     23      C) The installer will ask for permission to add conda into your login environment. I suggest saying {{{no}}} so that this installation cannot interfere with any other installed software, but if you want to use this Python for multiple purposes, you might prefer to answer otherwise.
     24
     25 4) Initialize the Python you have just installed using this command:
     26{{{
     27source ~/py39/bin/activate
     28}}}
     29 (note that this command will depend on the answer used in 3B above.)
     30
     31 5) Install the other Python packages required by GSAS-II with this command:
     32{{{
     33conda install python=3.9 wxpython numpy scipy matplotlib pyopengl pillow h5py imageio -c conda-forge
     34}}}
     35
     36 6) Assuming that subversion is installed, install GSAS-II using these four commands:
     37
     38{{{
     39(base) toby@bht21 ~ % mkdir /tmp/GSASII                         
     40(base) toby@bht21 ~ % cd /tmp/GSASII   
     41(base) toby@bht21 GSASII % svn export https://subversion.xray.aps.anl.gov/pyGSAS/install/bootstrap.py .
     42(base) toby@bht21 GSASII % python bootstrap.py
     43}}}
     44 Note that if subversion is not installed and in the path, the third command will fail. This is also required for the fourth command.
     45
     46== GSAS-II using Homebrew ==
     47
     48(June 2021) 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 MacOS 11.2.3. As I write this, Anaconda is not supporting ARM Macs and the wxpython version of miniforge is broken, so I had to install Python and associated packages with [https://brew.sh homebrew].
     49
     50=== Installing Homebrew ===
    851
    952See [https://docs.brew.sh/Installation this page]. Note that access to a Admin level account is a requirement for this. Use these steps:
     
    2467}}}
    2568
    26 == Install stuff with brew ==
     69=== Install stuff with brew ===
    2770
    2871Brew is used to install a bunch of things. Here are the commands I used:
     
    3578}}}
    3679
    37 == Install more stuff with pip ==
     80=== Install more stuff with pip ===
    3881
    3982{{{
     
    4386
    4487
    45 == Install GSAS-II ==
     88=== Install GSAS-II ===
    4689
    4790These steps are best done from a user account rather than an admin account. You can log out of the admin account or simply close the terminal window used before and open a new one.