Skip to content

Instantly share code, notes, and snippets.

@kevin-keraudren
Last active May 17, 2016 08:57
Show Gist options
  • Save kevin-keraudren/f325344bc262621eed9ce42bfe02b03f to your computer and use it in GitHub Desktop.
Save kevin-keraudren/f325344bc262621eed9ce42bfe02b03f to your computer and use it in GitHub Desktop.

Notes for MacOSX

  • Anaconda installer:

      wget http://09c8d0b2229f813c1b93-c95ac804525aac4b6dba79b00b39d1d3.r79.cf1.rackcdn.com/Anaconda-2.1.0-MacOSX-x86_64.sh
    
  • When installing opencv:

      conda install opencv
    

    you get:

      numpy:     1.9.0-py27_0 --> 1.7.1-py27_2
    

    you can safely run:

      conda install numpy=1.9.0
    

    once OpenCV is installed

  • Edit CMakeCache.txt and ensure that PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY point to the Anaconda environment

  • If you get:

      ImportError: dlopen(irtk/_irtk.so, 2): Library not loaded: libpng15.15.dylib
        Referenced from: /Users/kevin/Prachi/irtk/build/lib/irtk/_irtk.so
        Reason: image not found
    

    Then add the missing library to your path:

      export ANACONDA_HOME=$HOME/anacondaIRTK
      export DYLD_FALLBACK_LIBRARY_PATH=$ANACONDA_HOME/lib
    
  • If you get:

      TypeError: copy() got an unexpected keyword argument 'order'
    

    Add a dummy argument order='C' in ~/Prachi/irtk/build/lib/irtk/image.py:Image.copy:

    def copy( self, dtype=None, order='C' ):       
        return Image( self.get_data(dtype), self.get_header(), squeeze=False )
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment