wiki:InstallMac

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

--

Installing GSAS-II on Mac OS X

GSAS-II has been tested by us (Brian) on Intel (i386) Macs typically running 10.12 to 10.15 (Catalina). GSAS-II does not yet run on Apple Silicon (M1) CPUs and it also has serious problems with OS X 11 (Big Sur) see below for more.

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 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 three commands below in that window:
mkdir -p ~/.conda
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

If this fails, see the expanded instructions, which include an alternate download location.

  1. Answer prompts from the install script, pressing Enter to start, then space to page through the copyright notice.
  1. Type Yes for to accept the license information.
  1. Enter the installation location. Spaces or special characters in the name may cause problems (or maybe not). Once you have installed in a location, do not move the files elsewhere. Instead install again. Make a note of where you have installed GSAS-II; this may be useful if you have problems.
  1. Wait while the files are installed (typically a few minutes)
  1. Type "no" for "initializing gsas2full using conda init"
  1. Drag the GSAS-II app to the dock (optional). Do not move this file.
  1. Create an alias for the GSAS-II app and move to the desktop -- or elsewhere (optional). This can be renamed if desired after moving.

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 Mac OS X version, etc.

Big Sur

There are two problems with running GSAS-II on Macs under Big Sur that have not yet been properly addressed. One major, one minor. The major one is that Python needs an update to find the OpenGL library. A patch for that is here but a better fix is not available yet. The minor one is that the AppleScript fails with a "Not authorized to send Apple events to Terminal" error. Clicking Edit and running the script from inside the Script Editor (click on the arrow in the upper right) is clumsy, but does work.