wiki:InstallMac

Version 12 (modified by toby, 9 months ago) (diff)

--

Installing GSAS-II on MacOS

GSAS-II has been tested by us (Brian) on Intel (x86) Macs typically running 10.12 to 10.15 (Catalina). GSAS-II does not yet run on Apple Silicon (M1) CPUs. The installation process on MacOS 11.0 (Big Sur) see below for more has been debugged, but little testing of the code has yet been done.

While this is not recommended, GSAS-II can be run on older versions of OS X (even back to 10.6) but you will need to find and install older Python distributions, see the "hard way" instructions. We can't help you with this.

Installing the easy way

Most people will install GSAS-II by downloading a single file that contains all needed Python packages and then launches a script that downloads the appropriate files from the GSAS-II svn server. The instructions below briefly describe how to do this, but more a expanded version of these instructions are here that show screen images and explore the most likely errors. If this does not solve problems, please report them.

  1. Open a terminal window. Paste the two lines below in that window:
g2="https://subversion.xray.aps.anl.gov/admin_pyGSAS/downloads/gsas2full-Latest-MacOSX-x86_64.sh"
curl "$g2" > /tmp/g2.sh; bash /tmp/g2.sh -b -p ~/g2full

Note that this installs GSAS-II into directory g2full in your home folder. Change ~/g2full if desired. Also, you are agreeing to the licenses for Python, listed here and the GSAS-II, listed here. Omit the "-b -p ~/g2full" from the command above for a more verbose installation, where you can type the install path and see the licenses. See the expanded instructions for more details.

  1. Wait while the files are installed (typically a few minutes)
  1. Drag the GSAS-II app to the dock (optional). Note that this file cannot be moved to another folder. It is possible to create an alias and move that, for example if you want access to GSAS-II app on your desktop.

Note that the first time that GSAS-II is started you will need to confirm that access to the Terminal app will be allowed.

Installing the hard way

See these instructions if you want to install Python yourself or have an old MacOS version, etc.

Big Sur

There are two problems with running GSAS-II on Macs under Big Sur. These have been resolved in the installer as of 8 Jan 2021. If upgrading MacOS and have a previous installation, it is possible to update by running bootstrap.py to get the latest code and to fix permissions on the .app (by running makeMacApp.py), but reinstalling may be easier.

For those who care, the major bug here is that due to macOS 11 changes, Python needs an update to find the OpenGL library. See discussion here. Eventually Python should catch up. A more minor bug is that the AppleScript used to launch GSAS-II fails with a "Not authorized to send Apple events to Terminal" error. A fix for that appears to be to open and save the script inside the Script Editor. This is now done automatically in the installation process.