-
Notifications
You must be signed in to change notification settings - Fork 126
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.
- Install Xcode from AppStore
- Install Xcode command line tools
xcode-select --install
- Install home-brew package manager
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install git
brew install git
brew install git-lfs
- Add the necessary brew 'taps'
brew tap mantidproject/mantid
brew tap caskroom/cask
brew tap cartr/qt4
brew tap-pin cartr/qt4
- Install xquartz and mactex:
brew cask install xquartz
brew cask install mactex
- Install mantid-dev
brew install mantid-dev
- Remove python from brew
brew uninstall --ignore-dependencies python
brew uninstall --ignore-dependencies python@2
- Get pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- Install pip
sudo python get-pip.py
- Install pip packages
sudo pip install matplotlib qtawesome psutil sphinx ipython qtpy pycifrw PyYAML mock sphinx_bootstrap_theme
- 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
- Clone mantid repository
[email protected]:mantidproject/mantid.git
-
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
-
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
- Enable again the system integrity protection by repeating Step 14 and typing this time:
csrutil enable