Set up new Mac OS X for a high energy theorist This is the list of setup (for new Mac or updated Mac system) when you would like to use Mac OS X as a high energy theorist. The following is just a record of my own installation,

(1)

Install Xcode, and X11.

first install Xcode in App Store. Then run Xcode-select –install in terminal. The pop out windows suggests to install Xcode command line tools. Agree to install it. Then install x11 via xquartz website download.

https://www.xquartz.org

(2)

Open terminal, setup terminal to have homebrew style.

Install Fink: http://www.finkproject.org/

In default, Fink will be installed to /sw.

(2) or

Install MacPort: http://www.macports.org/

In default, MacPort will be installed to /opt/local/. All the software (using port installation) will be installed to /opt/local

(3)

Before install gfortran, one needs go to System Preferences… > Security & Privacy and there should be a button sayingOpen Anyway, under the General tab.

Then Install gfortran: https://gcc.gnu.org/wiki/GFortranBinaries others are quite old: http://r.research.att.com/tools/, do not install hpc gfortran

after installation, fortran is located at /usr/local/bin/gfortran

(3) or

Use MacPort: gcc 4.x from MacPorts for /opt/local/bin/gfortran or alternatively use this gfortran.dmg Or use gfotran.dmg in http://root.cern.ch/drupal/content/build-prerequisites

(4)

In terminal, modify ~/.profile, or ~/.bash_profile softlink gfortran to g77 in /usr/local/bin via

sudo ln -s /usr/local/bin/gfortran /usr/local/bin/g77

but g++ and gcc are still using /usr/bin/g++ and /usr/bin/gcc

(5)

Install editor textmate 2: (alternative is vico)

http://macromates.com/download

use tar -xjf to untar it, and then move to /Applications/

or compile from source:

https://github.com/textmate/textmate

I installed sudo port install ninja ragel boost multimarkdown mercurial

(6)

before installing root, install pythia due to configure setup

First install pythia, note one should enable-shared to communicate with root, it will be installed in the same folder.

./configure –enable-shared make

remove –installdir=~/HepCode/pythia due to the fact that it will be installed to the directory where source is.

Install ROOT, notice one needs to enable minut2, roofit and pythia8 to use them One needs to build another folder to make install

./configure –enable-minuit2 –enable-roofit –enable-pythia8 –with-pythia8-incdir=~/HepCode/pythia/include –with-pythia8-libdir=~/HepCode/pythia/lib –enable-python make make install

Other dir are related to prefix/….

remove –prefix=~/HepCode/root –etcdir=~/HepCode/root/etc due to the following fact: By default, the system will be installed location independent. In that case the whole package will live under the directory it was built in.

It will be installed to the directory where the source is.

(7)

Install Fastjet

default it will be installed to /usr/local, so one need to ./configure –prefix=~/HepCode/fastjet

(8)

Install mactex, or just basictex

(9)

Install CernLib: http://www.webalice.it/angelo.graziosi/macosx/cernlib/cernlib.html

(10)

Install python modules, using pip install

for example, numpy, etc

first need to install pip,

Mac OS X already have easy_install, so you only need to easy_install pip

then pip is installed into /usr/local/bin/pip

pip list to list all the installed packages. it includes numpy and scipy.

If we would like to install ipython, then there is another issue in latest system, which is discussed in

http://apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-os-x-el-capitan-upgrade

two things need to be done:

create a file called .pydistutils.cfg at ~ folder

[install] install-data=/usr/local install-headers=/usr/local

create a file called fix_mac_path.pth should be placed in /Library/Python/2.7/site-packages

import sys; std_paths=[p for p in sys.path if p.startswith(‘/System/’) and not ‘/Extras/’ in p]; sys.path=[p for p in sys.path if not p.startswith(‘/System/’)]+std_paths

Now run

sudo pip install ipython[all]

run

ipython notebook

(11)

install madgraph, pythia-pgs, delphes etc