Setting up the DL Code on OS X - twongjirad/LArLiteSoftCookBook GitHub Wiki

Building on OS X

These are notes from installing the DL code on OS X starting basically from scratch. Used OS X Sierra.

Get Xcode

  1. upgrade to Sierra
  2. install Xcode: go into the App store and search for Xcode
  3. install Xcode command line tools

No anaconda

One popular python package that is sometimes installed on OS X is anaconda. It is highly recommended to remove this if its installed.

Get home brew

Home brew is a package manager for OS X. Basically, it manages a bunch of scripts to install various common software packages. One can build and install software in a single command.

Note, there are other package managers for OS X. The most popular alternative is MacPorts. Always remember,

  • NEVER MIX PACKAGE MANAGERS!! *

Breaking this rule can lead to a big, complex mess.

  1. install home brew

Use home brew to install packages

  1. brew install python
  2. brew install sip
  3. brew install cmake
  4. brew install opencv3
  5. brew info opencv3: this will give you a message about activating python bindings. Run the command in that message.

Install ROOT

  1. install XQuartz
  2. make a folder for root to live in. inside make a build folder.
  3. get the code from the root repository
  4. run cmake
  5. make
  6. add thisroot.sh to .bash_profile so environment variables for ROOT is setup in shell

install dependencies for LArCV viewer

  1. brew install pyqt --without-python3 --with-python
  2. pip install pyqtgraph

install DL code

  1. clone unified repo
  2. check setup.sh so that OPENCV_LIBDIR and OPENCV_INCDIR environment variables point to the right place.
  3. source configure.sh
  4. make -j4