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,
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.
Open terminal, setup terminal to have homebrew style.
Install Fink: http://www.finkproject.org/
In default, Fink will be installed to /sw.
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
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
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
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
Install editor textmate 2: (alternative is vico)
use tar -xjf to untar it, and then move to /Applications/
or compile from source:
I installed sudo port install ninja ragel boost multimarkdown mercurial
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.
default it will be installed to /usr/local, so one need to ./configure –prefix=~/HepCode/fastjet
Install mactex, or just basictex
Install CernLib: http://www.webalice.it/angelo.graziosi/macosx/cernlib/cernlib.html
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
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
sudo pip install ipython[all]
install madgraph, pythia-pgs, delphes etc