McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics NEXMAP


About McStas
 Conditions of use
 Project funding

 Linux Install (deb/rpm)
 Mac OS X Install
 Unix Install (src code)
 Windows Install
 Other Downloads (share)

Mailing list

Search web/mailinglist

 McStas manual
 Known problems
 C Compilers




Report bugs


McStas Ubuntu live-dvd

McStas Installation on Mac OS X

The distribution packages for McStas may be downloaded via

Installing McStas 2.2a and later on Mac OS X

Before installing McStas, you need to install Xcode, e.g. from the App store (or installation medium).
You also need to install Command Line Tools inside Xcode (Xcode -> Preferences-> Downloads -> Components) and also allow installation of third party software (System Preferences -> Security & Privacy -> General -> Allow applications downloaded from: Anywhere) - can be reset after the installation of the McStas bundle.

You may furhter install either Intel C (commercial product) or the version of gcc available from, as they both work much better than the Apple-provided llvm and llvm-gcc compilers.
On MacOSX 10.8 and above (Mountain Lion, Mavericks), also install XQuartz (X11).

Important: If you want to keep your McStas 1.x alongside McStas 2.2a, please use our migration script BEFORE installing McStas 2.2a. If you want to keep your McStas 2.0 alongside McStas 2.2a, please use our migration script BEFORE installing McStas 2.2a.

Afterwards, unzip your downloaded McStas metapackage corresponding to your version of Mac OS X - we currently provide packages for 10.6 Snow Leopard, 10.7 Lion, 10.8 Mountain Lion, 10.9 Maverics and 10.10 Yosemite - and run it.

If you experience problems installing our standard tgz package, it may be down to corruption during unarchiving of the tgz. In that case, please try the correspoding ZIP package instead.

Apart from the dependencies mentioned above, the defaults of the installation bundle includes everything you need for a base installation of McStas, namely

  • McStas code generator, components, instruments and datafiles
  • The "classic" McStas Perl tools configured for use on your version of Mac OS X
  • PGPLOT graphical backend for mcplot/mcdisplay
  • McStas-specific extensions to Perl
  • Tk widgets for Perl
The installation procedure is shown in the images below.

Welcome screen:

Dependencies screen:

License agreement (GPL):

Confirming license:

Selection of packages to install. We recommend the default, which is to install McStas with our "classic" Perl tools. See below instructions to install the Python-dependencies

Before commencing install:

You will further be prompted to give your password for installation.

Installation finished:

To also enable the optional Python based tools, including our new mcgui-py you have to installf:

  • Anaconda Python (We generally recommend using the "for me only" option, but a system-wide installation should also work.)
When installation is done, start a new terminal and locate the folder where you downloaded and unpacked the McStas installation bundle. Inside the extras/ folder you will find a subfolder called QScintilla/.
  • Run the script BuildMe.command by typing "./BuildMe.command". (Browsing your way using Finder and double-clicking the BuildMe.command icon should also work)
  • NOTE: If your system prompts you to install command line tools: Accept to install. Afterwards, run the script "BuildMe.command" again.
  • "mcgui-py" should now be available.

Other optional addons

  • Optionally install iFit to visualize results using a Matlab environment (for free, no license needed).
  • Optionally install a VRML/X3D plotter such as InstantReality.
  • Optionally install Gnuplot.
  • Optionally install the NeXus format libraries to be able to export data files in HDF5.

Please report any trouble in using these instructions to

Last modified: Fri Apr 8 14:34:31 CEST 2016

Last Modified: Friday, 08-Apr-2016 14:37:08 CEST
Search website mailinglist archive GitHub repos