Installation on MaxOS - funkey/candidate_mc GitHub Wiki

There are many ways to achieve this, we are sure. Here we report on the way we installed candidate_mc on our Macs.

We tested this procedure on a OS X 10.9 (Mavericks) and a OS X 10.11 (El Capitan) machine. Both machines had Xcode, XQuartz, and the 'command-line utilities' installed before we started our attempts to configure and make candidate_mc.

Let us give you first a collections of reasons that failed the installation, and then walk you thorough our final sequence of steps to get it done.

Reasons for failed attempts:

  • candidate_mc uses boost, python, and many other packages. If you have all of them and get weird compile or linking errors you might have installed some dependencies via MacPorts, others via Homebrew. It is anyways a good idea to use only one of those on a single machine... we suggest brew.
  • multiple python installations might cause conflicts. Find below a way to explicitly tell cmake which python to use.
  • a incompatible version of Vigra (or Ilastik that comes with Vigra) is installed system wide. If this is not the case candidate_mc will download an adequate version during make. This might be want you want!

Ate-By-Step Installation:

  • Most likely not a minimal list, but this is all we have installed via Homebrew: aspell git-extras lame pkg-config atk glew libepoxy pwgen bash glib libffi py2cairo bash-completion gmp libmpc pygobject3 bash-git-prompt gnome-icon-theme libpng pyqt boost gobject-introspection libtiff python boost-python gradle maven qt cairo gsettings-desktop-schemas meld readline cmake gtk+3 mercurial sip eigen gtksourceview3 mpfr sqlite fftw harfbuzz mr szip fontconfig hdf5 netcat wget freetype hicolor-icon-theme numpy zeromq gcc htop-osx openexr zsh gdbm icu4c openssl zsh-completions gdk-pixbuf ilmbase pango zsh-history-substring-search gettext isl pcre zsh-syntax-highlighting git jpeg pixman
  • follow instructions in the README.md found in the root directory of candidate_mc up to the point where you would want to issue cmake ...
  • from within an empty 'build' directory call cmake -DGurobi_ROOT_DIR=/Library/gurobi650/mac64/ -DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Headers ... Please change given path to Gurobi and, if you know what you do, also the one to your favorite python. (The one shown above points to the python 2.7 installed via Homebrew.)
  • Call make. If you are not interested in the candidate_mc GUI components, you can go with make pycmc.
  • After some time, at the very end, you will get an error message regarding some unsuccessful copy command. This happens because the python library does not end in '.so' on Mac but in '.dylib' instead.
  • Go to folder 'python' within the build folder and ln -s libpycmc.dylib pycmc.so. Each folder containing such a symlink will enable you to issue 'import pycmc' from within your python or ipython console.

Want to start the bundle_optimizer (server)?

  • Go to your candidate_mc folder. In './scripts/servers' do
    • chmod +x bundle_optimizer.py
    • ln -s ../../build/python/libpycmc.dylib pycmc.so
    • Open the file 'bundle_optimizer.py' and change the first line to #!/usr/local/bin/python (this is, if you used the Homebrew python in the cake step explained above).
    • Start the server with: ./bundle_optimizer.py

We are aware that this document is not polished and very much tailored to our own experience on our two machines. Please feel free to edit/add/remove/update.