I just got a Mac and need to re-do the setup of my software stack. I'm keeping a log of anything tricky here, both for my own future reference and so others can use it as a reference. These instructions work for Lion and may work for other versions of OS X, but I haven't tested them.
Getting ROOT and pyROOT up and running:
Note: you can't use the pre-compiled ROOT because it's linked against the wrong version of python.
- Install Xcode from the Mac App Store. I got a few errors the first few times I tried to install it, but eventually it worked.
- Download and install the newest version of the enthought python distribution from http://www.enthought.com. If you hunt around, you can find a link to download it for free for academic use.
- Set up some environment variables. You can set ROOTSYS to the directory you want to install ROOT to.
export PYTHONDIR=/Library/Frameworks/EPD64.framework/Versions/Current export ROOTSYS=/usr/local/root export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib/:$LD_LIBRARY_PATH export PATH=$ROOTSYS/bin:$PYTHONDIR/bin:$PATH export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH
- Download the source for the newest production version of ROOT from http://root.cern.ch/drupal/content/downloading-root
- Unpack the tarball:
tar -xf root_blah_blah.tar
cd root
- Configure ROOT installation and compile
./configure macosx64 --enable-python --with-python-incdir=$PYTHONDIR/include --with-python-libdir=$PYTHONDIR/lib make sudo su export ROOTSYS=/usr/local/root make install exit
No comments:
Post a Comment