fiedl / hole-ice-study

This project aims to incorporate the effects of hole ice into the clsim photon propagation simulation of the icecube neutrino observatory.
Other
4 stars 2 forks source link

Write install instructions for macOS with Python 3 #120

Open fiedl opened 5 years ago

fiedl commented 5 years ago

See notes 2019-03-07.

Previous install guide: https://github.com/fiedl/hole-ice-study/blob/master/notes/2016-11-15_Installing_IceSim_on_macOS_Sierra.md

Notable issues:

Python 3

Install Python 3 via homebrew: brew install python.

The python binary (without 3 in the end) is located in /usr/local/opt/python/libexec/bin. Therefore, add this to the path:

# ~/.zshrc
# This is python 3 from homebrew. See `brew info python`.
export PATH="/usr/local/opt/python/libexec/bin:${PATH}"

Homebrew installs a python version with pyalloc, which is called python3.7m rather than python3.7. This causes cmake to not find it. Therefore, modify python.cmake:

# python.cmake

FIND_PATH(PYTHON_INCLUDE_DIR
  NAMES Python.h
  PATHS
    ${PYTHON_ROOT}/include
  PATH_SUFFIXES
    python${PYTHON_STRIPPED_MAJOR_MINOR_VERSION} python${PYTHON_STRIPPED_MAJOR_MINOR_VERSION}m
  NO_DEFAULT_PATH
)

Boost-Python

Install via homebrew for Python 3: brew install boost-python3.

In order to have cmake find the correct library, create symlinks following the expected naming convention:

[2019-03-07 16:45:34] fiedl@fiedl-mbp /usr/local/lib
▶ ln -s libboost_python37.dylib libboost_python3.7.dylib
▶ ln -s libboost_python37.a libboost_python3.7.a
fiedl commented 5 years ago

I've prepared reproducible install instructions at https://github.com/fiedl/hole-ice-install.