-
Notifications
You must be signed in to change notification settings - Fork 12
SetupTasksOsxMavericks
= HemeLB setup on OS X Mavericks=
It's probably easiest to first install Homebrew and then Canopy.
Go to http://brew.sh and follow the instructions.
You want the Academic, 64 bit version. Go to https://enthought.com/products/canopy/academic/ and register with an academic email address. Then download the installer.
Note that you may prefer to do a system-wide install rather than in your home directory only. See: http://docs.enthought.com/canopy/configure/canopy-cli.html
Not included in OS X by default.
brew install mercurial
See [CMake] for details.
brew install cmake
If using Canopy, ensure that you use the Canopy package manager to install quantities.
Install via homebrew
brew install cgal
You may be able to build it yourself as in the generic notes and the Mountain Lion notes.
For VMTK 1.2, you can use the binary egg as follows:
-
Set up a new virtual environment and activate it
SETUPTOOL_ROOT=~/sw/setuptool /Applications/Canopy.app/Contents/MacOS/Canopy_cli venv -s $SETUPTOOL_ROOT source $SETUPTOOL_ROOT/bin/activate
-
Install necessary packages
enpkg wxPython readline swig Cython
-
Download the binary egg from http://www.vmtk.org/download/ and install it with
easy_install ~/Downloads/vmtk-1.2-py2.7-macosx-10.9-intel.egg
-
Find the package directory with
python -c 'import pkg_resources; print pkg_resources.get_distribution("vmtk").location'
-
Edit the venv activate script to set VMTK environment variables. Add at the end
export VMTKHOME= export PATH=$VMTKHOME/vmtk/bin:$PATH export DYLD_LIBRARY_PATH=$VMTKHOME/vmtk/lib:$DYLD_LIBRARY_PATH export PYTHONPATH=$VMTKHOME/vmtk/lib:$VMTKHOME/vmtk:$PYTHONPATH
-
Deactivate and reactivate the venv.
-
We now need to fix the linking, because it's wrong. a. Figure out old, wrong python library path:
cd $VMTKHOME/vmtk/lib otool -L vtkCommonPython.so Now look for the line that links to the system python framework. Store in a variable. For me this is
old_py=/System/Library/Frameworks/Python.framework/Versions/2.7/Python a. Figure out the new library.
otool -L
which python
Find the python library, usually ending either "Python" or "libpython.dylib". For me this wasnew_py=@rpath/Python a. Change the linking of all the VMTK and VTK libraries. Don't worry - if the old path isn't in the library,
install_name_tool
won't do anything.cd $VMTKHOME/vmtk/lib for lib in *; do install_name_tool -change $old_py $new_py $lib; done
-
Check it works! a. VTK and WX:
cd ~ python -m vtk.wx.wxVTKRenderWindowInteractor This should pop up a window with a cone in it, that you can turn around. Exit with 'q' b. VMTK
cd $HEMELB/../RegressionTests/diffTest gunzip -k cyl.stl.gz vmtksurfaceviewer -ifile cyl.stl This should open a window with a cylinder in it. Exit with 'q'.
See the generic instructions
OS X no longer comes with an MPI
brew install open-mpi
The HemeLB master CMake file is able to install these but it may be
easier to use brew
.
brew install ctemplate
brew install cppunit
brew install tinyxml
brew install boost
If you want to install ParMETIS this way, then you must "tap" the science Homebrew repo first, if you haven't already:
brew tap homebrew/science
brew install parmetis