Difference between revisions of "Documentation/Labs/SlicerCondaIntegration"

From Slicer Wiki
Jump to: navigation, search
(Created page with 'Slicer currently builds a custom python distribution from source, but not all useful packages are available. But [https://store.continuum.io/cshop/anaconda/ Anaconda] provides a…')
 
Line 1: Line 1:
 
Slicer currently builds a custom python distribution from source, but not all useful packages are available.  But [https://store.continuum.io/cshop/anaconda/ Anaconda] provides a set of binaries that might provide a more comprehensive ecosystem.
 
Slicer currently builds a custom python distribution from source, but not all useful packages are available.  But [https://store.continuum.io/cshop/anaconda/ Anaconda] provides a set of binaries that might provide a more comprehensive ecosystem.
 +
 +
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda.
 +
 +
==1: compile Slicer against miniconda==
 +
ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DPYTHON_EXECUTABLE:FILEPATH=/Users/Jorge/miniconda/bin/python -DPYTHON_INCLUDE_DIR:PATH=/Users/Jorge/miniconda/include/python2.7 -DPYTHON_LIBRARY:FILEPATH=/Users/Jorge/miniconda/lib/libpython2.7.dylib -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  -G  "Eclipse CDT4 - Unix Makefiles" ../Slicer-Conda
 +
 +
Doing this, it seems that the Slicer superbuild works ok, and some packages are installed in /Users/Jorge/miniconda/lib/python2.7/site-packages. Ex: gitdb, numpy, SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg
 +
 +
SimpleITK is not properly installed, when I run miniconda interpreter and try to import it, I get an error:
 +
 +
  import SimpleITK
 +
  Traceback (most recent call last):
 +
  File "<stdin>", line 1, in <module>
 +
  File "/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py", line 1, in <module>
 +
    from .SimpleITK import *
 +
  File "/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py", line 28, in <module>
 +
    _SimpleITK = swig_import_helper()
 +
  File "/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py", line 24, in swig_import_helper
 +
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)
 +
  ImportError: dlopen(/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib
 +
  Referenced from: /Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/_SimpleITK.so
 +
  Reason: image not found
 +
 +
However, other libraries like gitdb or numpy seem to work properly.

Revision as of 21:03, 30 January 2015

Home < Documentation < Labs < SlicerCondaIntegration

Slicer currently builds a custom python distribution from source, but not all useful packages are available. But Anaconda provides a set of binaries that might provide a more comprehensive ecosystem.

Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda.

1: compile Slicer against miniconda

ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DPYTHON_EXECUTABLE:FILEPATH=/Users/Jorge/miniconda/bin/python -DPYTHON_INCLUDE_DIR:PATH=/Users/Jorge/miniconda/include/python2.7 -DPYTHON_LIBRARY:FILEPATH=/Users/Jorge/miniconda/lib/libpython2.7.dylib -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -G "Eclipse CDT4 - Unix Makefiles" ../Slicer-Conda

Doing this, it seems that the Slicer superbuild works ok, and some packages are installed in /Users/Jorge/miniconda/lib/python2.7/site-packages. Ex: gitdb, numpy, SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg

SimpleITK is not properly installed, when I run miniconda interpreter and try to import it, I get an error:

 import SimpleITK
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py", line 1, in <module>
   from .SimpleITK import *
 File "/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py", line 28, in <module>
   _SimpleITK = swig_import_helper()
 File "/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py", line 24, in swig_import_helper
   _mod = imp.load_module('_SimpleITK', fp, pathname, description)
 ImportError: dlopen(/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib
 Referenced from: /Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/_SimpleITK.so
 Reason: image not found

However, other libraries like gitdb or numpy seem to work properly.