Skip to content

Developer Setup on macOS

Gagik Vardanyan edited this page Oct 26, 2018 · 3 revisions

These are the steps to setup the mantid dependencies on macOS.

  1. Install Xcode from AppStore
  2. Install Xcode command line tools
xcode-select --install
  1. Install home-brew package manager
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Install git
brew install git
brew install git-lfs
  1. Add the necessary brew 'taps'
brew tap mantidproject/mantid
brew tap caskroom/cask
brew tap cartr/qt4
brew tap-pin cartr/qt4
  1. Install xquartz and mactex:
brew cask install xquartz
brew cask install mactex
  1. Install mantid-dev
brew install mantid-dev
  1. Remove python from brew
brew uninstall --ignore-dependencies python
brew uninstall --ignore-dependencies python@2
  1. Get pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
  1. Install pip
sudo python get-pip.py
  1. Install pip packages
sudo pip install matplotlib qtawesome psutil sphinx ipython qtpy pycifrw PyYAML mock sphinx_bootstrap_theme
  1. Add homebrew's site-packages to the path:
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
  1. Clone mantid repository
git@github.com:mantidproject/mantid.git
  1. Disable the system integrity protection (SIP). To do this

    • restart the computer
    • before the apple logo appears press Command+R to enter the recovery mode
    • when in recovery mode, go to Utilities>Terminal and type
    csrutil disable
    
    • reboot again
  2. Now that SIP is disabled we can do the necessary patch:

cd /usr/include/python2.7
sudo cp pyport.h pyport.h.original
sudo patch pyport.h $MANTIDCHECKOUTROOT/buildconfig/pyport.patch
  1. Enable again the system integrity protection by repeating Step 14 and typing this time:
csrutil enable