<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jonieva</id>
	<title>Slicer Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jonieva"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/wiki/Special:Contributions/Jonieva"/>
	<updated>2026-05-17T16:02:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=44713</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=44713"/>
		<updated>2016-01-22T19:09:16Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: Added survey for Anaconda packages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Instead of attempting to use the whole Anaconda package, our approach will be to use Miniconda, a reduced version of Anaconda, and (1) install a pre-defined set of packages and (2) provide a way to easily install new ones. &lt;br /&gt;
&lt;br /&gt;
== Update 2016-01-22 (Jorge) ==&lt;br /&gt;
After a follow up with JC about this topic, and due to the apparent complexity of this task, it has been decided to make a small survey to have a better idea of which would be the most needed packages for the community from those ones available in Anaconda. &lt;br /&gt;
&lt;br /&gt;
The link to indicate your preferences is: https://docs.google.com/spreadsheets/d/1j4iugjs0GkHEn1elUbceMW2KJ21FM-QrYoFtZ4P9yOc/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
== Update 2015-10-10 ==&lt;br /&gt;
&lt;br /&gt;
We (Kitware) did few experiments where we copied the anaconda numpy and SciPy packages into a Slicer build tree and run the associated tests. The link below summarizes the results.&lt;br /&gt;
&lt;br /&gt;
It turns out that there are a lot of issues with this approach. &lt;br /&gt;
&lt;br /&gt;
See https://docs.google.com/spreadsheets/d/1aQSEr5JjeNVqiaWNB0ZPLWJqo32E-yAfynXJawYGwY8/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
Next step: We suggest to continue with the initial approach where Slicer is built against miniconda Python libraries.&lt;br /&gt;
&lt;br /&gt;
== Virtual Hackfest: August 24, 9am ==&lt;br /&gt;
&lt;br /&gt;
=== Info ===&lt;br /&gt;
&lt;br /&gt;
Location: Google hangout (connection details will be shared on the Slicer developer list)&lt;br /&gt;
&lt;br /&gt;
What: Work on Slicer and Conda integration&lt;br /&gt;
&lt;br /&gt;
=== Proposed tasks ===&lt;br /&gt;
* &amp;lt;s&amp;gt;Review and consolidate contributions of Jorge and Adam&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
* &amp;lt;s&amp;gt;Implement miniconda external project files as outlined [[#Next_steps|below]]&amp;lt;/s&amp;gt; {{done}}&lt;br /&gt;
* Create a Slicer module providing:&lt;br /&gt;
** (1) scripted interface to install additional conda package&lt;br /&gt;
** (2) UI to provide similar functionality&lt;br /&gt;
* Update [[Documentation/Nightly/Developers/Extensions/DescriptionFile|extension description format]] to specify python dependencies that could be installed either at build/package time or at run time.&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
* Jorge:&lt;br /&gt;
** https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
** http://slicer-devel.65872.n3.nabble.com/Compiling-Slicer-with-Anaconda-td4033321.html&lt;br /&gt;
* Adam:&lt;br /&gt;
** https://github.com/adamrankin/SlicerTAVI&lt;br /&gt;
** http://slicer-devel.65872.n3.nabble.com/Re-Slicer-build-with-custom-python-td4034662.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
* Download the source code hosted in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build (assuming MacOSX 10.9):&lt;br /&gt;
  cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk \	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \ &lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes in the source code are in Superbuild/External_python.cmake and in Superbuild/External_NUMPY.cmake files (in the current version Slicer will use Anaconda Numpy).&lt;br /&gt;
For the sake of testing, the next Python Conda modules are installed by default: numpy, scikit-learn.&lt;br /&gt;
&lt;br /&gt;
====Issues==== &lt;br /&gt;
* libsqlite3.dylib library in miniconda has a conflict with CTK:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Workaround: delete or rename the file (there is a hack included in the External_python.cmake file to this end).&lt;br /&gt;
&lt;br /&gt;
* When running Slicer.app (not the binary file in Slicer-Superbuild-Conda/Slicer-build) the program is not using Miniconda, but the System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, in order that the system works, '''Slicer must be started from a terminal running the file Slicer-Superbuild-Conda/Slicer-build/Slicer'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build Slicer normally, except for the setting Slicer_USE_CONDA_python. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \  &lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Different approach====&lt;br /&gt;
&lt;br /&gt;
===== 2015-02-04 - Steve Pieper =====&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplete&lt;br /&gt;
&lt;br /&gt;
===== 2015-03-02 - Jc =====&lt;br /&gt;
&lt;br /&gt;
2015-03-02(Jc): To simplify even further, using Slicer &amp;gt;= r24007, the following is expected to work. It is not needed to manually remove Numpy.&lt;br /&gt;
&lt;br /&gt;
This is achieved by specifying &amp;lt;code&amp;gt;-DSlicer_USE_SYSTEM_NUMPY:BOOL=1&amp;lt;/code&amp;gt; and also by specifying all dependencies of NUMPY (python, zlib, OpenSSL and CTKAPPLAUNCHER) should not be expected on the system.&lt;br /&gt;
&lt;br /&gt;
Note also that since I built Qt against the latest version of OpenSSL in the 1.0.1 series, I explicitly add &amp;lt;code&amp;gt;-DOPENSSL_DOWNLOAD_VERSION:STRING=1.0.1l&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QT_QMAKE_EXECUTABLE=/home/jcfr/Support/qt-everywhere-opensource-release-build-4.8.6/bin/qmake&lt;br /&gt;
CONDA_ROOT=/home/jcfr/Projects/sandbox&lt;br /&gt;
&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Release \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${CONDA_ROOT}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${CONDA_ROOT}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${CONDA_ROOT}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=1 \&lt;br /&gt;
  -DOPENSSL_DOWNLOAD_VERSION:STRING=1.0.1l \&lt;br /&gt;
  -DSlicer_USE_SYSTEM_CTKAPPLAUNCHER:BOOL=0 \&lt;br /&gt;
  -DSlicer_USE_SYSTEM_OpenSSL:BOOL=0 \&lt;br /&gt;
  -DSlicer_USE_SYSTEM_zlib:BOOL=0 \&lt;br /&gt;
  -DSlicer_USE_SYSTEM_python:BOOL=0 \&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=1 \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
nice make -j4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Although the code in https://github.com/jonieva/Slicer/tree/Conda should work with Windows too (using the setting Slicer_USE_CONDA_python=ON), it has not been tested at the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer and python 2.7.10 + drop in conda binary packages ==&lt;br /&gt;
&lt;br /&gt;
=== Initial experiments ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
Copied from the conclusion of the [[Developer_Meetings/20150324#Conclusions|Developer hangout of March 24th 2015]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;&lt;br /&gt;
* Python conda - next steps:&lt;br /&gt;
** Create External_miniconda.cmake&lt;br /&gt;
** Add a variable named EXTERNAL_PYTHON_NAME that could take two values: python or miniconda&lt;br /&gt;
*** In the SuperBuild.cmake, an option named  EXTERNAL_PYTHON_NAME could be added. By default, it would be set to &amp;quot;python&amp;quot; but could switch to &amp;quot;miniconda&amp;quot;&lt;br /&gt;
** Projects like External_{CTK, VTK}.cmake would be updated to depend on ${EXTERNAL_PYTHON_NAME}&lt;br /&gt;
** For now, let's consider only the case OpenSSL disabled.&lt;br /&gt;
&amp;lt;/s&amp;gt; &lt;br /&gt;
{{done}} See https://github.com/jcfr/Slicer/tree/slicer-miniconda&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40955</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40955"/>
		<updated>2015-02-24T16:30:44Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: Section removed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
* Download the source code hosted in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build (assuming MacOSX 10.9):&lt;br /&gt;
  cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk \	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \ &lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes in the source code are in Superbuild/External_python.cmake and in Superbuild/External_NUMPY.cmake files (in the current version Slicer will use Anaconda Numpy).&lt;br /&gt;
For the sake of testing, the next Python Conda modules are installed by default: numpy, scikit-learn.&lt;br /&gt;
&lt;br /&gt;
====Issues==== &lt;br /&gt;
* libsqlite3.dylib library in miniconda has a conflict with CTK:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Workaround: delete or rename the file (there is a hack included in the External_python.cmake file to this end).&lt;br /&gt;
&lt;br /&gt;
* When running Slicer.app (not the binary file in Slicer-Superbuild-Conda/Slicer-build) the program is not using Miniconda, but the System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, in order that the system works, '''Slicer must be started from a terminal running the file Slicer-Superbuild-Conda/Slicer-build/Slicer'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build Slicer normally, except for the setting Slicer_USE_CONDA_python. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \  &lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Different approach====&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplete&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Although the code in https://github.com/jonieva/Slicer/tree/Conda should work with Windows too (using the setting Slicer_USE_CONDA_python=ON), it has not been tested at the moment.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40954</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40954"/>
		<updated>2015-02-24T16:29:47Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: Section removed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
* Download the source code hosted in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build (assuming MacOSX 10.9):&lt;br /&gt;
  cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk \	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \ &lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes in the source code are in Superbuild/External_python.cmake and in Superbuild/External_NUMPY.cmake files (in the current version Slicer will use Anaconda Numpy).&lt;br /&gt;
For the sake of testing, the next Python Conda modules are installed by default: numpy, scikit-learn.&lt;br /&gt;
&lt;br /&gt;
====Issues==== &lt;br /&gt;
* libsqlite3.dylib library in miniconda has a conflict with CTK:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Workaround: delete or rename the file (there is a hack included in the External_python.cmake file to this end).&lt;br /&gt;
&lt;br /&gt;
* When running Slicer.app (not the binary file in Slicer-Superbuild-Conda/Slicer-build) the program is not using Miniconda, but the System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, in order that the system works, '''Slicer must be started from a terminal running the file Slicer-Superbuild-Conda/Slicer-build/Slicer'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build Slicer normally, except for the setting Slicer_USE_CONDA_python. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \  &lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Different approach====&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
** Building a Slicer-Python with Miniconda&lt;br /&gt;
It should work without problems if you download the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer/tree/Conda and running this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DSlicer_BUILD_CLI:BOOL=OFF &lt;br /&gt;
-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Although the code in https://github.com/jonieva/Slicer/tree/Conda should work with Windows too (using the setting Slicer_USE_CONDA_python=ON), it has not been tested at the moment.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40953</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40953"/>
		<updated>2015-02-24T16:29:19Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: Section removed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
* Download the source code hosted in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build (assuming MacOSX 10.9):&lt;br /&gt;
  cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk \	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \ &lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes in the source code are in Superbuild/External_python.cmake and in Superbuild/External_NUMPY.cmake files (in the current version Slicer will use Anaconda Numpy).&lt;br /&gt;
For the sake of testing, the next Python Conda modules are installed by default: numpy, scikit-learn.&lt;br /&gt;
&lt;br /&gt;
====Issues==== &lt;br /&gt;
* libsqlite3.dylib library in miniconda has a conflict with CTK:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Workaround: delete or rename the file (there is a hack included in the External_python.cmake file to this end).&lt;br /&gt;
&lt;br /&gt;
* When running Slicer.app (not the binary file in Slicer-Superbuild-Conda/Slicer-build) the program is not using Miniconda, but the System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, in order that the system works, '''Slicer must be started from a terminal running the file Slicer-Superbuild-Conda/Slicer-build/Slicer'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build Slicer normally, except for the setting Slicer_USE_CONDA_python. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \  &lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Different approach====&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
** Building a Slicer-Python with Miniconda&lt;br /&gt;
It should work without problems if you download the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer/tree/Conda and running this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DSlicer_BUILD_CLI:BOOL=OFF &lt;br /&gt;
-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Although the code in https://github.com/jonieva/Slicer/tree/Conda should work with Windows too (using the setting Slicer_USE_CONDA_python=ON), it has not been tested at the moment.&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40952</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40952"/>
		<updated>2015-02-24T16:28:53Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Compile Slicer using System Python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
* Download the source code hosted in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build (assuming MacOSX 10.9):&lt;br /&gt;
  cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk \	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \ &lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes in the source code are in Superbuild/External_python.cmake and in Superbuild/External_NUMPY.cmake files (in the current version Slicer will use Anaconda Numpy).&lt;br /&gt;
For the sake of testing, the next Python Conda modules are installed by default: numpy, scikit-learn.&lt;br /&gt;
&lt;br /&gt;
====Issues==== &lt;br /&gt;
* libsqlite3.dylib library in miniconda has a conflict with CTK:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Workaround: delete or rename the file (there is a hack included in the External_python.cmake file to this end).&lt;br /&gt;
&lt;br /&gt;
* When running Slicer.app (not the binary file in Slicer-Superbuild-Conda/Slicer-build) the program is not using Miniconda, but the System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, in order that the system works, '''Slicer must be started from a terminal running the file Slicer-Superbuild-Conda/Slicer-build/Slicer'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build Slicer normally, except for the setting Slicer_USE_CONDA_python. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \  &lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Different approach====&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
** Building a Slicer-Python with Miniconda&lt;br /&gt;
It should work without problems if you download the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer/tree/Conda and running this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DSlicer_BUILD_CLI:BOOL=OFF &lt;br /&gt;
-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Although the code in https://github.com/jonieva/Slicer/tree/Conda should work with Windows too (using the setting Slicer_USE_CONDA_python=ON), it has not been tested at the moment.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40951</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40951"/>
		<updated>2015-02-24T16:27:48Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Compile Slicer against miniconda */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
* Download the source code hosted in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build (assuming MacOSX 10.9):&lt;br /&gt;
  cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk \	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \ &lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes in the source code are in Superbuild/External_python.cmake and in Superbuild/External_NUMPY.cmake files (in the current version Slicer will use Anaconda Numpy).&lt;br /&gt;
For the sake of testing, the next Python Conda modules are installed by default: numpy, scikit-learn.&lt;br /&gt;
&lt;br /&gt;
====Issues==== &lt;br /&gt;
* libsqlite3.dylib library in miniconda has a conflict with CTK:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Workaround: delete or rename the file (there is a hack included in the External_python.cmake file to this end).&lt;br /&gt;
&lt;br /&gt;
* When running Slicer.app (not the binary file in Slicer-Superbuild-Conda/Slicer-build) the program is not using Miniconda, but the System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, in order that the system works, '''Slicer must be started from a terminal running the file Slicer-Superbuild-Conda/Slicer-build/Slicer'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build Slicer normally, except for the setting Slicer_USE_CONDA_python. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \  &lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Different approach====&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
** Building a Slicer-Python with Miniconda&lt;br /&gt;
It should work without problems if you download the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer/tree/Conda and running this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DSlicer_BUILD_CLI:BOOL=OFF &lt;br /&gt;
-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Although the code in https://github.com/jonieva/Slicer/tree/Conda should work with Windows too (using the setting Slicer_USE_CONDA_python=ON), it has not been tested at the moment.&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40950</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40950"/>
		<updated>2015-02-24T16:26:38Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: Refactor and simplification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
* Download the source code hosted in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build (assuming MacOSX 10.9):&lt;br /&gt;
  cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk \	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \ &lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes in the source code are in Superbuild/External_python.cmake and in Superbuild/External_NUMPY.cmake files (in the current version Slicer will use Anaconda Numpy).&lt;br /&gt;
For the sake of testing, the next Python Conda modules are installed by default: numpy, scikit-learn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Issues==== &lt;br /&gt;
* libsqlite3.dylib library in miniconda has a conflict with CTK:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Workaround: delete or rename the file (there is a hack included in the External_python.cmake file to this end).&lt;br /&gt;
&lt;br /&gt;
* When running Slicer.app (not the binary file in Slicer-Superbuild-Conda/Slicer-build) the program is not using Miniconda, but the System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, in order that the system works, '''Slicer must be started from a terminal running the file Slicer-Superbuild-Conda/Slicer-build/Slicer'''&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
* Download the source code in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
* Build Slicer normally, except for the setting Slicer_USE_CONDA_python. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  '''-DSlicer_USE_CONDA_python:BOOL=ON''' \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \  &lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Different approach====&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
** Building a Slicer-Python with Miniconda&lt;br /&gt;
It should work without problems if you download the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer/tree/Conda and running this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DSlicer_BUILD_CLI:BOOL=OFF &lt;br /&gt;
-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Although the code in https://github.com/jonieva/Slicer/tree/Conda should work with Windows too (using the setting Slicer_USE_CONDA_python=ON), it has not been tested at the moment.&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40912</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40912"/>
		<updated>2015-02-17T15:53:01Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
**First approach: install Miniconda manually and then build Slicer against it&lt;br /&gt;
&lt;br /&gt;
Assuming that we already installed Miniconda in the default folder ({HOME}/miniconda), we could build Slicer against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is also possible that you have to set another ones like:&lt;br /&gt;
&lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Besides, it is necessary to fix rpath in the library:&lt;br /&gt;
&lt;br /&gt;
  install_name_tool -id {HOME}/miniconda/lib/libpython2.7.dylib {HOME}/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
  Note: the paths have to be absolute, so you want to replace {HOME} for your home folder.&lt;br /&gt;
&lt;br /&gt;
**Second approach: to build a &amp;quot;SlicerPython&amp;quot; using Miniconda&lt;br /&gt;
I created a fork from Slicer to implement this approach, packaging Miniconda and installing it in a similar way that SlicerPython is used now. You can download the code in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
&lt;br /&gt;
To build with this code:&lt;br /&gt;
&lt;br /&gt;
  cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes are in Superbuild/External_python.cmake file. There is a commented block that you can use to implement the first approach.&lt;br /&gt;
&lt;br /&gt;
However, at the moment I get a build error:&lt;br /&gt;
&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This problem can be &amp;quot;solved&amp;quot; if we replace the libsqlite3.dylib by a link to the /usr/lib/libsqlite3.dylib library, or even just removing the library from Miniconda. There is a hack included in the External_python.cmake file to this end.&lt;br /&gt;
&lt;br /&gt;
Also, when I run Slicer.app the program is not using Miniconda, but my System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;quot;Pre-release&amp;quot;&lt;br /&gt;
With all the mentioned fixes, Slicer should build against Miniconda using the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer/tree/Conda and using this command (with your right OSX version):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 &lt;br /&gt;
-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk &lt;br /&gt;
-DSlicer_BUILD_CLI:BOOL=OFF -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The application should be run from the binary in Slicer-build/Slicer, and as an example, Conda numpy and scikit-learn modules are installed.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
** Building a Slicer-Python with Miniconda&lt;br /&gt;
It should work without problems if you download the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer/tree/Conda and running this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DSlicer_BUILD_CLI:BOOL=OFF &lt;br /&gt;
-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
Although the code in https://github.com/jonieva/Slicer/tree/Conda should work with Windows too (using the setting Slicer_USE_CONDA_python=ON), it's not working at the moment.&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40911</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40911"/>
		<updated>2015-02-17T15:50:33Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
**First approach: install Miniconda manually and then build Slicer against it&lt;br /&gt;
&lt;br /&gt;
Assuming that we already installed Miniconda in the default folder ({HOME}/miniconda), we could build Slicer against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is also possible that you have to set another ones like:&lt;br /&gt;
&lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Besides, it is necessary to fix rpath in the library:&lt;br /&gt;
&lt;br /&gt;
  install_name_tool -id {HOME}/miniconda/lib/libpython2.7.dylib {HOME}/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
  Note: the paths have to be absolute, so you want to replace {HOME} for your home folder.&lt;br /&gt;
&lt;br /&gt;
**Second approach: to build a &amp;quot;SlicerPython&amp;quot; using Miniconda&lt;br /&gt;
I created a fork from Slicer to implement this approach, packaging Miniconda and installing it in a similar way that SlicerPython is used now. You can download the code in https://github.com/jonieva/Slicer/tree/Conda&lt;br /&gt;
&lt;br /&gt;
To build with this code:&lt;br /&gt;
&lt;br /&gt;
  cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes are in Superbuild/External_python.cmake file. There is a commented block that you can use to implement the first approach.&lt;br /&gt;
&lt;br /&gt;
However, at the moment I get a build error:&lt;br /&gt;
&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This problem can be &amp;quot;solved&amp;quot; if we replace the libsqlite3.dylib by a link to the /usr/lib/libsqlite3.dylib library, or even just removing the library from Miniconda. There is a hack included in the External_python.cmake file to this end.&lt;br /&gt;
&lt;br /&gt;
Also, when I run Slicer.app the program is not using Miniconda, but my System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;quot;Pre-release&amp;quot;&lt;br /&gt;
With all the mentioned fixes, Slicer should build against Miniconda using the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer/tree/Conda and using this command (with your right OSX version):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 &lt;br /&gt;
-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk &lt;br /&gt;
-DSlicer_BUILD_CLI:BOOL=OFF -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The application should be run from the binary in Slicer-build/Slicer, and as an example, Conda numpy and scikit-learn modules are installed.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
** Building a Slicer-Python with Miniconda&lt;br /&gt;
It should work without problems if you download the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer/tree/Conda and running this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DSlicer_BUILD_CLI:BOOL=OFF &lt;br /&gt;
-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40910</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40910"/>
		<updated>2015-02-17T15:49:21Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
**First approach: install Miniconda manually and then build Slicer against it&lt;br /&gt;
&lt;br /&gt;
Assuming that we already installed Miniconda in the default folder ({HOME}/miniconda), we could build Slicer against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is also possible that you have to set another ones like:&lt;br /&gt;
&lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Besides, it is necessary to fix rpath in the library:&lt;br /&gt;
&lt;br /&gt;
  install_name_tool -id {HOME}/miniconda/lib/libpython2.7.dylib {HOME}/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
  Note: the paths have to be absolute, so you want to replace {HOME} for your home folder.&lt;br /&gt;
&lt;br /&gt;
**Second approach: to build a &amp;quot;SlicerPython&amp;quot; using Miniconda&lt;br /&gt;
I created a fork from Slicer to implement this approach, packaging Miniconda and installing it in a similar way that SlicerPython is used now. You can download the code in https://github.com/jonieva/Slicer&lt;br /&gt;
&lt;br /&gt;
To build with this code:&lt;br /&gt;
&lt;br /&gt;
  cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes are in Superbuild/External_python.cmake file. There is a commented block that you can use to implement the first approach.&lt;br /&gt;
&lt;br /&gt;
However, at the moment I get a build error:&lt;br /&gt;
&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This problem can be &amp;quot;solved&amp;quot; if we replace the libsqlite3.dylib by a link to the /usr/lib/libsqlite3.dylib library, or even just removing the library from Miniconda. There is a hack included in the External_python.cmake file to this end.&lt;br /&gt;
&lt;br /&gt;
Also, when I run Slicer.app the program is not using Miniconda, but my System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;quot;Pre-release&amp;quot;&lt;br /&gt;
With all the mentioned fixes, Slicer should build against Miniconda using the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer and using this command (with your right OSX version):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 &lt;br /&gt;
-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk &lt;br /&gt;
-DSlicer_BUILD_CLI:BOOL=OFF -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The application should be run from the binary in Slicer-build/Slicer, and as an example, Conda numpy and scikit-learn modules are installed.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
** Building a Slicer-Python with Miniconda&lt;br /&gt;
It should work without problems if you download the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer/tree/Conda and running this command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DSlicer_BUILD_CLI:BOOL=OFF &lt;br /&gt;
-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40909</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40909"/>
		<updated>2015-02-17T15:46:50Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
**First approach: install Miniconda manually and then build Slicer against it&lt;br /&gt;
&lt;br /&gt;
Assuming that we already installed Miniconda in the default folder ({HOME}/miniconda), we could build Slicer against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is also possible that you have to set another ones like:&lt;br /&gt;
&lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Besides, it is necessary to fix rpath in the library:&lt;br /&gt;
&lt;br /&gt;
  install_name_tool -id {HOME}/miniconda/lib/libpython2.7.dylib {HOME}/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
  Note: the paths have to be absolute, so you want to replace {HOME} for your home folder.&lt;br /&gt;
&lt;br /&gt;
**Second approach: to build a &amp;quot;SlicerPython&amp;quot; using Miniconda&lt;br /&gt;
I created a fork from Slicer to implement this approach, packaging Miniconda and installing it in a similar way that SlicerPython is used now. You can download the code in https://github.com/jonieva/Slicer&lt;br /&gt;
&lt;br /&gt;
To build with this code:&lt;br /&gt;
&lt;br /&gt;
  cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes are in Superbuild/External_python.cmake file. There is a commented block that you can use to implement the first approach.&lt;br /&gt;
&lt;br /&gt;
However, at the moment I get a build error:&lt;br /&gt;
&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This problem can be &amp;quot;solved&amp;quot; if we replace the libsqlite3.dylib by a link to the /usr/lib/libsqlite3.dylib library, or even just removing the library from Miniconda. There is a hack included in the External_python.cmake file to this end.&lt;br /&gt;
&lt;br /&gt;
Also, when I run Slicer.app the program is not using Miniconda, but my System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;quot;Pre-release&amp;quot;&lt;br /&gt;
With all the mentioned fixes, Slicer should build against Miniconda using the branch &amp;quot;Conda&amp;quot; in https://github.com/jonieva/Slicer and using this command (with your right OSX version):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 &lt;br /&gt;
-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk &lt;br /&gt;
-DSlicer_BUILD_CLI:BOOL=OFF -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The application should be run from the binary in Slicer-build/Slicer, and as an example, Conda numpy and scikit-learn modules are installed.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40856</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40856"/>
		<updated>2015-02-11T16:57:32Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
**First approach: install Miniconda manually and then build Slicer against it&lt;br /&gt;
&lt;br /&gt;
Assuming that we already installed Miniconda in the default folder ({HOME}/miniconda), we could build Slicer against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is also possible that you have to set another ones like:&lt;br /&gt;
&lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Besides, it is necessary to fix rpath in the library:&lt;br /&gt;
&lt;br /&gt;
  install_name_tool -id {HOME}/miniconda/lib/libpython2.7.dylib {HOME}/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
  Note: the paths have to be absolute, so you want to replace {HOME} for your home folder.&lt;br /&gt;
&lt;br /&gt;
**Second approach: to build a &amp;quot;SlicerPython&amp;quot; using Miniconda&lt;br /&gt;
I created a fork from Slicer to implement this approach, packaging Miniconda and installing it in a similar way that SlicerPython is used now. You can download the code in https://github.com/jonieva/Slicer&lt;br /&gt;
&lt;br /&gt;
To build with this code:&lt;br /&gt;
&lt;br /&gt;
  cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes are in Superbuild/External_python.cmake file. There is a commented block that you can use to implement the first approach.&lt;br /&gt;
&lt;br /&gt;
However, at the moment I get a build error:&lt;br /&gt;
&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This problem can be &amp;quot;solved&amp;quot; if we replace the libsqlite3.dylib by a link to the /usr/lib/libsqlite3.dylib library, or even just removing the library from Miniconda. There is a hack included in the External_python.cmake file to this end.&lt;br /&gt;
&lt;br /&gt;
Also, when I run Slicer.app the program is not using Miniconda, but my System Python, so it doesn't find the right libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40855</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40855"/>
		<updated>2015-02-11T01:34:00Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
**First approach: install Miniconda manually and then build Slicer against it&lt;br /&gt;
&lt;br /&gt;
Assuming that we already installed Miniconda in the default folder ({HOME}/miniconda), we could build Slicer against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is also possible that you have to set another ones like:&lt;br /&gt;
&lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Besides, it is necessary to fix rpath in the library:&lt;br /&gt;
&lt;br /&gt;
  install_name_tool -id {HOME}/miniconda/lib/libpython2.7.dylib {HOME}/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
  Note: the paths have to be absolute, so you want to replace {HOME} for your home folder.&lt;br /&gt;
&lt;br /&gt;
**Second approach: to build a &amp;quot;SlicerPython&amp;quot; using Miniconda&lt;br /&gt;
I created a fork from Slicer to implement this approach, packaging Miniconda and installing it in a similar way that SlicerPython is used now. You can download the code in https://github.com/jonieva/Slicer&lt;br /&gt;
&lt;br /&gt;
To build with this code:&lt;br /&gt;
&lt;br /&gt;
  cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9&lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk	&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF -DSlicer_USE_CONDA_python:BOOL=ON ../Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes are in Superbuild/External_python.cmake file. There is a commented block that you can use to implement the first approach.&lt;br /&gt;
&lt;br /&gt;
However, at the moment I get a build error:&lt;br /&gt;
&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This problem can be &amp;quot;solved&amp;quot; if we replace the libsqlite3.dylib by a link to the /usr/lib/libsqlite3.dylib library, or even just removing the library from Miniconda. There is a hack included in the External_python.cmake file to this end.&lt;br /&gt;
&lt;br /&gt;
Also, when I run Slicer.app the program crashes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Process:         Slicer [1333]&lt;br /&gt;
  Path:            /Users/USER/*/Slicer.app/Contents/MacOS/./Slicer&lt;br /&gt;
  Identifier:      ???&lt;br /&gt;
  Version:         4.4.0 (4.4.0-2015-02-10)&lt;br /&gt;
  Code Type:       X86-64 (Native)&lt;br /&gt;
  Parent Process:  Slicer [1332]&lt;br /&gt;
  Responsible:     Terminal [205]&lt;br /&gt;
  User ID:         501&lt;br /&gt;
&lt;br /&gt;
  Date/Time:       2015-02-10 17:51:57.975 -0500&lt;br /&gt;
  OS Version:      Mac OS X 10.9.5 (13F34)&lt;br /&gt;
  Report Version:  11&lt;br /&gt;
  Anonymous UUID:  F95E6C4D-DD65-A370-437D-3C54CFE11E49&lt;br /&gt;
&lt;br /&gt;
  Sleep/Wake UUID: C450E55A-B4B9-4F0B-A350-F80A3FD33CB7&lt;br /&gt;
&lt;br /&gt;
  Crashed Thread:  0  Dispatch queue: com.apple.main-thread&lt;br /&gt;
&lt;br /&gt;
  Exception Type:  EXC_BAD_ACCESS (SIGSEGV)&lt;br /&gt;
  Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000098&lt;br /&gt;
&lt;br /&gt;
  VM Regions Near 0x98:&lt;br /&gt;
  --&amp;gt; &lt;br /&gt;
      __TEXT                 000000010858f000-00000001085bf000 [  192K] r-x/rwx SM=COW  /Users/USER/*/Slicer.app/Contents/MacOS/Slicer&lt;br /&gt;
&lt;br /&gt;
  Thread 0 Crashed:: Dispatch queue: com.apple.main-thread&lt;br /&gt;
  0   libpython2.7.dylib            	0x000000011eecbd18 subtype_dealloc + 216&lt;br /&gt;
  1   libPythonQt.dylib             	0x000000010cec58d0 PythonQtObjectPtr::~PythonQtObjectPtr() + 96 (PythonQtObjectPtr.cpp:52)&lt;br /&gt;
  2   libPythonQt.dylib             	0x000000010cec58f5 PythonQtObjectPtr::~PythonQtObjectPtr() + 21 (PythonQtObjectPtr.cpp:53)&lt;br /&gt;
  3   libPythonQt.dylib             	0x000000010cde6e5c PythonQtMemberInfo::~PythonQtMemberInfo() + 28 (PythonQtClassInfo.h:45)&lt;br /&gt;
  4   libPythonQt.dylib             	0x000000010cdde605 PythonQtMemberInfo::~PythonQtMemberInfo() + 21 (PythonQtClassInfo.h:45)&lt;br /&gt;
  5   libPythonQt.dylib             	0x000000010cde051c QHashNode&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHashNode() + 28 (qhash.h:216)&lt;br /&gt;
  6   libPythonQt.dylib             	0x000000010cde04f5 QHashNode&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHashNode() + 21 (qhash.h:216)&lt;br /&gt;
  7   libPythonQt.dylib             	0x000000010cde03dd QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::deleteNode2(QHashData::Node*) + 29 (qhash.h:523)&lt;br /&gt;
  8   QtCore                        	0x000000011947b73a QHashData::free_helper(void (*)(QHashData::Node*)) + 138&lt;br /&gt;
  9   libPythonQt.dylib             	0x000000010cde0473 QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::freeData(QHashData*) + 35 (qhash.h:571)&lt;br /&gt;
  10  libPythonQt.dylib             	0x000000010cde5d7c QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHash() + 60 (qhash.h:283)&lt;br /&gt;
  11  libPythonQt.dylib             	0x000000010cdde355 QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHash() + 21 (qhash.h:283)&lt;br /&gt;
  12  libPythonQt.dylib             	0x000000010cdd84c4 PythonQtClassInfo::~PythonQtClassInfo() + 500 (PythonQtClassInfo.cpp:78)&lt;br /&gt;
  13  libPythonQt.dylib             	0x000000010cdd87a5 PythonQtClassInfo::~PythonQtClassInfo() + 21 (PythonQtClassInfo.cpp:78)&lt;br /&gt;
  14  libPythonQt.dylib             	0x000000010cdfb2f6 PythonQtPrivate::~PythonQtPrivate() + 230 (PythonQt.cpp:231)&lt;br /&gt;
  15  libPythonQt.dylib             	0x000000010cdfb695 PythonQtPrivate::~PythonQtPrivate() + 21 (PythonQt.cpp:239)&lt;br /&gt;
  16  libPythonQt.dylib             	0x000000010cdfb6b8 PythonQtPrivate::~PythonQtPrivate() + 24 (PythonQt.cpp:224)&lt;br /&gt;
  17  libPythonQt.dylib             	0x000000010cdfb148 PythonQt::~PythonQt() + 72 (PythonQt.cpp:220)&lt;br /&gt;
  18  libPythonQt.dylib             	0x000000010cdfb1b5 PythonQt::~PythonQt() + 21 (PythonQt.cpp:222)&lt;br /&gt;
  19  libPythonQt.dylib             	0x000000010cdfb1d8 PythonQt::~PythonQt() + 24 (PythonQt.cpp:219)&lt;br /&gt;
  20  libPythonQt.dylib             	0x000000010cdfa46d PythonQt::cleanup() + 61 (PythonQt.cpp:155)&lt;br /&gt;
  21  libCTKScriptingPythonCore.0.1.dylib	0x000000010c4ce7fe ctkAbstractPythonManager::~ctkAbstractPythonManager() + 110 (ctkAbstractPythonManager.cpp:90)&lt;br /&gt;
  22  libqSlicerBaseQTCore.dylib    	0x000000010b8f9409 qSlicerCorePythonManager::~qSlicerCorePythonManager() + 153 (qSlicerCorePythonManager.cxx:59)&lt;br /&gt;
  23  libqSlicerBaseQTGUI.dylib     	0x0000000108a16115 qSlicerPythonManager::~qSlicerPythonManager() + 21 (qSlicerPythonManager.cxx:37)&lt;br /&gt;
  24  libqSlicerBaseQTGUI.dylib     	0x0000000108a16135 qSlicerPythonManager::~qSlicerPythonManager() + 21 (qSlicerPythonManager.cxx:37)&lt;br /&gt;
  25  libqSlicerBaseQTGUI.dylib     	0x0000000108a16158 qSlicerPythonManager::~qSlicerPythonManager() + 24 (qSlicerPythonManager.cxx:33)&lt;br /&gt;
  26  libqSlicerBaseQTCore.dylib    	0x000000010b8a3903 QtSharedPointer::ExternalRefCount&amp;lt;qSlicerCorePythonManager&amp;gt;::deref(QtSharedPointer::ExternalRefCountData*, qSlicerCorePythonManager*) + 115 (qsharedpointer_impl.h:342)&lt;br /&gt;
  27  libqSlicerBaseQTCore.dylib    	0x000000010b8a37d9 void QtSharedPointer::ExternalRefCount&amp;lt;qSlicerCorePythonManager&amp;gt;::internalCopy&amp;lt;qSlicerCorePythonManager&amp;gt;(QtSharedPointer::ExternalRefCount&amp;lt;qSlicerCorePythonManager&amp;gt; const&amp;amp;) + 121 (qsharedpointer_impl.h:413)&lt;br /&gt;
  28  libqSlicerBaseQTCore.dylib    	0x000000010b8a2357 QSharedPointer&amp;lt;qSlicerCorePythonManager&amp;gt;::operator=(QSharedPointer&amp;lt;qSlicerCorePythonManager&amp;gt; const&amp;amp;) + 39 (qsharedpointer_impl.h:484)&lt;br /&gt;
  29  libqSlicerBaseQTCore.dylib    	0x000000010b8a13ad QSharedPointer&amp;lt;qSlicerCorePythonManager&amp;gt;::clear() + 45 (qsharedpointer_impl.h:543)&lt;br /&gt;
  30  libqSlicerBaseQTCore.dylib    	0x000000010b8978b2 qSlicerCoreApplicationPrivate::~qSlicerCoreApplicationPrivate() + 82 (qSlicerCoreApplication.cxx:138)&lt;br /&gt;
  31  libqSlicerBaseQTGUI.dylib     	0x000000010897a595 qSlicerApplicationPrivate::~qSlicerApplicationPrivate() + 261 (qSlicerApplication.cxx:157)&lt;br /&gt;
  32  libqSlicerBaseQTGUI.dylib     	0x000000010897a615 qSlicerApplicationPrivate::~qSlicerApplicationPrivate() + 21 (qSlicerApplication.cxx:157)&lt;br /&gt;
  33  libqSlicerBaseQTGUI.dylib     	0x000000010897a638 qSlicerApplicationPrivate::~qSlicerApplicationPrivate() + 24 (qSlicerApplication.cxx:146)&lt;br /&gt;
  34  libqSlicerBaseQTCore.dylib    	0x000000010b8a457e QScopedPointerDeleter&amp;lt;qSlicerCoreApplicationPrivate&amp;gt;::cleanup(qSlicerCoreApplicationPrivate*) + 46 (qscopedpointer.h:63)&lt;br /&gt;
  35  libqSlicerBaseQTCore.dylib    	0x000000010b8a4537 QScopedPointer&amp;lt;qSlicerCoreApplicationPrivate, QScopedPointerDeleter&amp;lt;qSlicerCoreApplicationPrivate&amp;gt; &amp;gt;::~QScopedPointer() + 39 (qscopedpointer.h:101)&lt;br /&gt;
  36  libqSlicerBaseQTCore.dylib    	0x000000010b8a1c25 QScopedPointer&amp;lt;qSlicerCoreApplicationPrivate, QScopedPointerDeleter&amp;lt;qSlicerCoreApplicationPrivate&amp;gt; &amp;gt;::~QScopedPointer() + 21 (qscopedpointer.h:102)&lt;br /&gt;
  37  libqSlicerBaseQTCore.dylib    	0x000000010b89ccca qSlicerCoreApplication::~qSlicerCoreApplication() + 42 (qSlicerCoreApplication.cxx:670)&lt;br /&gt;
  38  libqSlicerBaseQTGUI.dylib     	0x000000010897cda5 qSlicerApplication::~qSlicerApplication() + 21 (qSlicerApplication.cxx:316)&lt;br /&gt;
  39  libqSlicerBaseQTGUI.dylib     	0x000000010897cdc5 qSlicerApplication::~qSlicerApplication() + 21 (qSlicerApplication.cxx:316)&lt;br /&gt;
  40                                	0x00000001085bb989 (anonymous namespace)::SlicerAppMain(int, char**) + 4825&lt;br /&gt;
  41                                	0x00000001085ba6a2 main + 34&lt;br /&gt;
  42  libdyld.dylib                 	0x00007fff8b4bc5fd start + 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40854</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40854"/>
		<updated>2015-02-11T00:58:55Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
**First approach: install Miniconda manually and then build Slicer against it&lt;br /&gt;
&lt;br /&gt;
Assuming that we already installed Miniconda in the default folder ({HOME}/miniconda), we could build Slicer against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is also possible that you have to set another ones like:&lt;br /&gt;
&lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Besides, it is necessary to fix rpath in the library:&lt;br /&gt;
&lt;br /&gt;
  install_name_tool -id {HOME}/miniconda/lib/libpython2.7.dylib {HOME}/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
  Note: the paths have to be absolute, so you want to replace {HOME} for your home folder.&lt;br /&gt;
&lt;br /&gt;
**Second approach: to build a &amp;quot;SlicerPython&amp;quot; using Miniconda&lt;br /&gt;
I created a fork from Slicer to implement this approach, packaging Miniconda and installing it in a similar way that SlicerPython is used now. You can download the code in https://github.com/jonieva/Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes are in Superbuild/External_python.cmake file. There is a commented block that you can use to implement the first approach.&lt;br /&gt;
&lt;br /&gt;
However, at the moment I get a build error:&lt;br /&gt;
&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This problem can be &amp;quot;solved&amp;quot; if we replace the libsqlite3.dylib by a link to the /usr/lib/libsqlite3.dylib library, or even just removing the library from Miniconda.&lt;br /&gt;
&lt;br /&gt;
Also, when I run Slicer.app the program crashes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Process:         Slicer [1333]&lt;br /&gt;
  Path:            /Users/USER/*/Slicer.app/Contents/MacOS/./Slicer&lt;br /&gt;
  Identifier:      ???&lt;br /&gt;
  Version:         4.4.0 (4.4.0-2015-02-10)&lt;br /&gt;
  Code Type:       X86-64 (Native)&lt;br /&gt;
  Parent Process:  Slicer [1332]&lt;br /&gt;
  Responsible:     Terminal [205]&lt;br /&gt;
  User ID:         501&lt;br /&gt;
&lt;br /&gt;
  Date/Time:       2015-02-10 17:51:57.975 -0500&lt;br /&gt;
  OS Version:      Mac OS X 10.9.5 (13F34)&lt;br /&gt;
  Report Version:  11&lt;br /&gt;
  Anonymous UUID:  F95E6C4D-DD65-A370-437D-3C54CFE11E49&lt;br /&gt;
&lt;br /&gt;
  Sleep/Wake UUID: C450E55A-B4B9-4F0B-A350-F80A3FD33CB7&lt;br /&gt;
&lt;br /&gt;
  Crashed Thread:  0  Dispatch queue: com.apple.main-thread&lt;br /&gt;
&lt;br /&gt;
  Exception Type:  EXC_BAD_ACCESS (SIGSEGV)&lt;br /&gt;
  Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000098&lt;br /&gt;
&lt;br /&gt;
  VM Regions Near 0x98:&lt;br /&gt;
  --&amp;gt; &lt;br /&gt;
      __TEXT                 000000010858f000-00000001085bf000 [  192K] r-x/rwx SM=COW  /Users/USER/*/Slicer.app/Contents/MacOS/Slicer&lt;br /&gt;
&lt;br /&gt;
  Thread 0 Crashed:: Dispatch queue: com.apple.main-thread&lt;br /&gt;
  0   libpython2.7.dylib            	0x000000011eecbd18 subtype_dealloc + 216&lt;br /&gt;
  1   libPythonQt.dylib             	0x000000010cec58d0 PythonQtObjectPtr::~PythonQtObjectPtr() + 96 (PythonQtObjectPtr.cpp:52)&lt;br /&gt;
  2   libPythonQt.dylib             	0x000000010cec58f5 PythonQtObjectPtr::~PythonQtObjectPtr() + 21 (PythonQtObjectPtr.cpp:53)&lt;br /&gt;
  3   libPythonQt.dylib             	0x000000010cde6e5c PythonQtMemberInfo::~PythonQtMemberInfo() + 28 (PythonQtClassInfo.h:45)&lt;br /&gt;
  4   libPythonQt.dylib             	0x000000010cdde605 PythonQtMemberInfo::~PythonQtMemberInfo() + 21 (PythonQtClassInfo.h:45)&lt;br /&gt;
  5   libPythonQt.dylib             	0x000000010cde051c QHashNode&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHashNode() + 28 (qhash.h:216)&lt;br /&gt;
  6   libPythonQt.dylib             	0x000000010cde04f5 QHashNode&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHashNode() + 21 (qhash.h:216)&lt;br /&gt;
  7   libPythonQt.dylib             	0x000000010cde03dd QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::deleteNode2(QHashData::Node*) + 29 (qhash.h:523)&lt;br /&gt;
  8   QtCore                        	0x000000011947b73a QHashData::free_helper(void (*)(QHashData::Node*)) + 138&lt;br /&gt;
  9   libPythonQt.dylib             	0x000000010cde0473 QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::freeData(QHashData*) + 35 (qhash.h:571)&lt;br /&gt;
  10  libPythonQt.dylib             	0x000000010cde5d7c QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHash() + 60 (qhash.h:283)&lt;br /&gt;
  11  libPythonQt.dylib             	0x000000010cdde355 QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHash() + 21 (qhash.h:283)&lt;br /&gt;
  12  libPythonQt.dylib             	0x000000010cdd84c4 PythonQtClassInfo::~PythonQtClassInfo() + 500 (PythonQtClassInfo.cpp:78)&lt;br /&gt;
  13  libPythonQt.dylib             	0x000000010cdd87a5 PythonQtClassInfo::~PythonQtClassInfo() + 21 (PythonQtClassInfo.cpp:78)&lt;br /&gt;
  14  libPythonQt.dylib             	0x000000010cdfb2f6 PythonQtPrivate::~PythonQtPrivate() + 230 (PythonQt.cpp:231)&lt;br /&gt;
  15  libPythonQt.dylib             	0x000000010cdfb695 PythonQtPrivate::~PythonQtPrivate() + 21 (PythonQt.cpp:239)&lt;br /&gt;
  16  libPythonQt.dylib             	0x000000010cdfb6b8 PythonQtPrivate::~PythonQtPrivate() + 24 (PythonQt.cpp:224)&lt;br /&gt;
  17  libPythonQt.dylib             	0x000000010cdfb148 PythonQt::~PythonQt() + 72 (PythonQt.cpp:220)&lt;br /&gt;
  18  libPythonQt.dylib             	0x000000010cdfb1b5 PythonQt::~PythonQt() + 21 (PythonQt.cpp:222)&lt;br /&gt;
  19  libPythonQt.dylib             	0x000000010cdfb1d8 PythonQt::~PythonQt() + 24 (PythonQt.cpp:219)&lt;br /&gt;
  20  libPythonQt.dylib             	0x000000010cdfa46d PythonQt::cleanup() + 61 (PythonQt.cpp:155)&lt;br /&gt;
  21  libCTKScriptingPythonCore.0.1.dylib	0x000000010c4ce7fe ctkAbstractPythonManager::~ctkAbstractPythonManager() + 110 (ctkAbstractPythonManager.cpp:90)&lt;br /&gt;
  22  libqSlicerBaseQTCore.dylib    	0x000000010b8f9409 qSlicerCorePythonManager::~qSlicerCorePythonManager() + 153 (qSlicerCorePythonManager.cxx:59)&lt;br /&gt;
  23  libqSlicerBaseQTGUI.dylib     	0x0000000108a16115 qSlicerPythonManager::~qSlicerPythonManager() + 21 (qSlicerPythonManager.cxx:37)&lt;br /&gt;
  24  libqSlicerBaseQTGUI.dylib     	0x0000000108a16135 qSlicerPythonManager::~qSlicerPythonManager() + 21 (qSlicerPythonManager.cxx:37)&lt;br /&gt;
  25  libqSlicerBaseQTGUI.dylib     	0x0000000108a16158 qSlicerPythonManager::~qSlicerPythonManager() + 24 (qSlicerPythonManager.cxx:33)&lt;br /&gt;
  26  libqSlicerBaseQTCore.dylib    	0x000000010b8a3903 QtSharedPointer::ExternalRefCount&amp;lt;qSlicerCorePythonManager&amp;gt;::deref(QtSharedPointer::ExternalRefCountData*, qSlicerCorePythonManager*) + 115 (qsharedpointer_impl.h:342)&lt;br /&gt;
  27  libqSlicerBaseQTCore.dylib    	0x000000010b8a37d9 void QtSharedPointer::ExternalRefCount&amp;lt;qSlicerCorePythonManager&amp;gt;::internalCopy&amp;lt;qSlicerCorePythonManager&amp;gt;(QtSharedPointer::ExternalRefCount&amp;lt;qSlicerCorePythonManager&amp;gt; const&amp;amp;) + 121 (qsharedpointer_impl.h:413)&lt;br /&gt;
  28  libqSlicerBaseQTCore.dylib    	0x000000010b8a2357 QSharedPointer&amp;lt;qSlicerCorePythonManager&amp;gt;::operator=(QSharedPointer&amp;lt;qSlicerCorePythonManager&amp;gt; const&amp;amp;) + 39 (qsharedpointer_impl.h:484)&lt;br /&gt;
  29  libqSlicerBaseQTCore.dylib    	0x000000010b8a13ad QSharedPointer&amp;lt;qSlicerCorePythonManager&amp;gt;::clear() + 45 (qsharedpointer_impl.h:543)&lt;br /&gt;
  30  libqSlicerBaseQTCore.dylib    	0x000000010b8978b2 qSlicerCoreApplicationPrivate::~qSlicerCoreApplicationPrivate() + 82 (qSlicerCoreApplication.cxx:138)&lt;br /&gt;
  31  libqSlicerBaseQTGUI.dylib     	0x000000010897a595 qSlicerApplicationPrivate::~qSlicerApplicationPrivate() + 261 (qSlicerApplication.cxx:157)&lt;br /&gt;
  32  libqSlicerBaseQTGUI.dylib     	0x000000010897a615 qSlicerApplicationPrivate::~qSlicerApplicationPrivate() + 21 (qSlicerApplication.cxx:157)&lt;br /&gt;
  33  libqSlicerBaseQTGUI.dylib     	0x000000010897a638 qSlicerApplicationPrivate::~qSlicerApplicationPrivate() + 24 (qSlicerApplication.cxx:146)&lt;br /&gt;
  34  libqSlicerBaseQTCore.dylib    	0x000000010b8a457e QScopedPointerDeleter&amp;lt;qSlicerCoreApplicationPrivate&amp;gt;::cleanup(qSlicerCoreApplicationPrivate*) + 46 (qscopedpointer.h:63)&lt;br /&gt;
  35  libqSlicerBaseQTCore.dylib    	0x000000010b8a4537 QScopedPointer&amp;lt;qSlicerCoreApplicationPrivate, QScopedPointerDeleter&amp;lt;qSlicerCoreApplicationPrivate&amp;gt; &amp;gt;::~QScopedPointer() + 39 (qscopedpointer.h:101)&lt;br /&gt;
  36  libqSlicerBaseQTCore.dylib    	0x000000010b8a1c25 QScopedPointer&amp;lt;qSlicerCoreApplicationPrivate, QScopedPointerDeleter&amp;lt;qSlicerCoreApplicationPrivate&amp;gt; &amp;gt;::~QScopedPointer() + 21 (qscopedpointer.h:102)&lt;br /&gt;
  37  libqSlicerBaseQTCore.dylib    	0x000000010b89ccca qSlicerCoreApplication::~qSlicerCoreApplication() + 42 (qSlicerCoreApplication.cxx:670)&lt;br /&gt;
  38  libqSlicerBaseQTGUI.dylib     	0x000000010897cda5 qSlicerApplication::~qSlicerApplication() + 21 (qSlicerApplication.cxx:316)&lt;br /&gt;
  39  libqSlicerBaseQTGUI.dylib     	0x000000010897cdc5 qSlicerApplication::~qSlicerApplication() + 21 (qSlicerApplication.cxx:316)&lt;br /&gt;
  40                                	0x00000001085bb989 (anonymous namespace)::SlicerAppMain(int, char**) + 4825&lt;br /&gt;
  41                                	0x00000001085ba6a2 main + 34&lt;br /&gt;
  42  libdyld.dylib                 	0x00007fff8b4bc5fd start + 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40853</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40853"/>
		<updated>2015-02-10T23:26:03Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
**First approach: install Miniconda manually and then build Slicer against it&lt;br /&gt;
&lt;br /&gt;
Assuming that we already installed Miniconda in the default folder ({HOME}/miniconda), we could build Slicer against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is also possible that you have to set another ones like:&lt;br /&gt;
&lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Besides, it is necessary to fix rpath in the library:&lt;br /&gt;
&lt;br /&gt;
  install_name_tool -id {HOME}/miniconda/lib/libpython2.7.dylib {HOME}/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
  Note: the paths have to be absolute, so you want to replace {HOME} for your home folder.&lt;br /&gt;
&lt;br /&gt;
**Second approach: to build a &amp;quot;SlicerPython&amp;quot; using Miniconda&lt;br /&gt;
I created a fork from Slicer to implement this approach, packaging Miniconda and installing it in a similar way that SlicerPython is used now. You can download the code in https://github.com/jonieva/Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes are in Superbuild/External_python.cmake file. There is a commented block that you can use to implement the first approach.&lt;br /&gt;
&lt;br /&gt;
However, at the moment I get a build error:&lt;br /&gt;
&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
  [ 10%] Built target CTKDICOMCore&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This problem can be &amp;quot;solved&amp;quot; if we replace the libsqlite3.dylib by a link to the /usr/lib/libsqlite3.dylib library, or even just removing the library from Miniconda.&lt;br /&gt;
&lt;br /&gt;
Also, when I run Slicer.app the program crashes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Process:         Slicer [1333]&lt;br /&gt;
  Path:            /Users/USER/*/Slicer.app/Contents/MacOS/./Slicer&lt;br /&gt;
  Identifier:      ???&lt;br /&gt;
  Version:         4.4.0 (4.4.0-2015-02-10)&lt;br /&gt;
  Code Type:       X86-64 (Native)&lt;br /&gt;
  Parent Process:  Slicer [1332]&lt;br /&gt;
  Responsible:     Terminal [205]&lt;br /&gt;
  User ID:         501&lt;br /&gt;
&lt;br /&gt;
  Date/Time:       2015-02-10 17:51:57.975 -0500&lt;br /&gt;
  OS Version:      Mac OS X 10.9.5 (13F34)&lt;br /&gt;
  Report Version:  11&lt;br /&gt;
  Anonymous UUID:  F95E6C4D-DD65-A370-437D-3C54CFE11E49&lt;br /&gt;
&lt;br /&gt;
  Sleep/Wake UUID: C450E55A-B4B9-4F0B-A350-F80A3FD33CB7&lt;br /&gt;
&lt;br /&gt;
  Crashed Thread:  0  Dispatch queue: com.apple.main-thread&lt;br /&gt;
&lt;br /&gt;
  Exception Type:  EXC_BAD_ACCESS (SIGSEGV)&lt;br /&gt;
  Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000098&lt;br /&gt;
&lt;br /&gt;
  VM Regions Near 0x98:&lt;br /&gt;
  --&amp;gt; &lt;br /&gt;
      __TEXT                 000000010858f000-00000001085bf000 [  192K] r-x/rwx SM=COW  /Users/USER/*/Slicer.app/Contents/MacOS/Slicer&lt;br /&gt;
&lt;br /&gt;
  Thread 0 Crashed:: Dispatch queue: com.apple.main-thread&lt;br /&gt;
  0   libpython2.7.dylib            	0x000000011eecbd18 subtype_dealloc + 216&lt;br /&gt;
  1   libPythonQt.dylib             	0x000000010cec58d0 PythonQtObjectPtr::~PythonQtObjectPtr() + 96 (PythonQtObjectPtr.cpp:52)&lt;br /&gt;
  2   libPythonQt.dylib             	0x000000010cec58f5 PythonQtObjectPtr::~PythonQtObjectPtr() + 21 (PythonQtObjectPtr.cpp:53)&lt;br /&gt;
  3   libPythonQt.dylib             	0x000000010cde6e5c PythonQtMemberInfo::~PythonQtMemberInfo() + 28 (PythonQtClassInfo.h:45)&lt;br /&gt;
  4   libPythonQt.dylib             	0x000000010cdde605 PythonQtMemberInfo::~PythonQtMemberInfo() + 21 (PythonQtClassInfo.h:45)&lt;br /&gt;
  5   libPythonQt.dylib             	0x000000010cde051c QHashNode&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHashNode() + 28 (qhash.h:216)&lt;br /&gt;
  6   libPythonQt.dylib             	0x000000010cde04f5 QHashNode&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHashNode() + 21 (qhash.h:216)&lt;br /&gt;
  7   libPythonQt.dylib             	0x000000010cde03dd QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::deleteNode2(QHashData::Node*) + 29 (qhash.h:523)&lt;br /&gt;
  8   QtCore                        	0x000000011947b73a QHashData::free_helper(void (*)(QHashData::Node*)) + 138&lt;br /&gt;
  9   libPythonQt.dylib             	0x000000010cde0473 QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::freeData(QHashData*) + 35 (qhash.h:571)&lt;br /&gt;
  10  libPythonQt.dylib             	0x000000010cde5d7c QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHash() + 60 (qhash.h:283)&lt;br /&gt;
  11  libPythonQt.dylib             	0x000000010cdde355 QHash&amp;lt;QByteArray, PythonQtMemberInfo&amp;gt;::~QHash() + 21 (qhash.h:283)&lt;br /&gt;
  12  libPythonQt.dylib             	0x000000010cdd84c4 PythonQtClassInfo::~PythonQtClassInfo() + 500 (PythonQtClassInfo.cpp:78)&lt;br /&gt;
  13  libPythonQt.dylib             	0x000000010cdd87a5 PythonQtClassInfo::~PythonQtClassInfo() + 21 (PythonQtClassInfo.cpp:78)&lt;br /&gt;
  14  libPythonQt.dylib             	0x000000010cdfb2f6 PythonQtPrivate::~PythonQtPrivate() + 230 (PythonQt.cpp:231)&lt;br /&gt;
  15  libPythonQt.dylib             	0x000000010cdfb695 PythonQtPrivate::~PythonQtPrivate() + 21 (PythonQt.cpp:239)&lt;br /&gt;
  16  libPythonQt.dylib             	0x000000010cdfb6b8 PythonQtPrivate::~PythonQtPrivate() + 24 (PythonQt.cpp:224)&lt;br /&gt;
  17  libPythonQt.dylib             	0x000000010cdfb148 PythonQt::~PythonQt() + 72 (PythonQt.cpp:220)&lt;br /&gt;
  18  libPythonQt.dylib             	0x000000010cdfb1b5 PythonQt::~PythonQt() + 21 (PythonQt.cpp:222)&lt;br /&gt;
  19  libPythonQt.dylib             	0x000000010cdfb1d8 PythonQt::~PythonQt() + 24 (PythonQt.cpp:219)&lt;br /&gt;
  20  libPythonQt.dylib             	0x000000010cdfa46d PythonQt::cleanup() + 61 (PythonQt.cpp:155)&lt;br /&gt;
  21  libCTKScriptingPythonCore.0.1.dylib	0x000000010c4ce7fe ctkAbstractPythonManager::~ctkAbstractPythonManager() + 110 (ctkAbstractPythonManager.cpp:90)&lt;br /&gt;
  22  libqSlicerBaseQTCore.dylib    	0x000000010b8f9409 qSlicerCorePythonManager::~qSlicerCorePythonManager() + 153 (qSlicerCorePythonManager.cxx:59)&lt;br /&gt;
  23  libqSlicerBaseQTGUI.dylib     	0x0000000108a16115 qSlicerPythonManager::~qSlicerPythonManager() + 21 (qSlicerPythonManager.cxx:37)&lt;br /&gt;
  24  libqSlicerBaseQTGUI.dylib     	0x0000000108a16135 qSlicerPythonManager::~qSlicerPythonManager() + 21 (qSlicerPythonManager.cxx:37)&lt;br /&gt;
  25  libqSlicerBaseQTGUI.dylib     	0x0000000108a16158 qSlicerPythonManager::~qSlicerPythonManager() + 24 (qSlicerPythonManager.cxx:33)&lt;br /&gt;
  26  libqSlicerBaseQTCore.dylib    	0x000000010b8a3903 QtSharedPointer::ExternalRefCount&amp;lt;qSlicerCorePythonManager&amp;gt;::deref(QtSharedPointer::ExternalRefCountData*, qSlicerCorePythonManager*) + 115 (qsharedpointer_impl.h:342)&lt;br /&gt;
  27  libqSlicerBaseQTCore.dylib    	0x000000010b8a37d9 void QtSharedPointer::ExternalRefCount&amp;lt;qSlicerCorePythonManager&amp;gt;::internalCopy&amp;lt;qSlicerCorePythonManager&amp;gt;(QtSharedPointer::ExternalRefCount&amp;lt;qSlicerCorePythonManager&amp;gt; const&amp;amp;) + 121 (qsharedpointer_impl.h:413)&lt;br /&gt;
  28  libqSlicerBaseQTCore.dylib    	0x000000010b8a2357 QSharedPointer&amp;lt;qSlicerCorePythonManager&amp;gt;::operator=(QSharedPointer&amp;lt;qSlicerCorePythonManager&amp;gt; const&amp;amp;) + 39 (qsharedpointer_impl.h:484)&lt;br /&gt;
  29  libqSlicerBaseQTCore.dylib    	0x000000010b8a13ad QSharedPointer&amp;lt;qSlicerCorePythonManager&amp;gt;::clear() + 45 (qsharedpointer_impl.h:543)&lt;br /&gt;
  30  libqSlicerBaseQTCore.dylib    	0x000000010b8978b2 qSlicerCoreApplicationPrivate::~qSlicerCoreApplicationPrivate() + 82 (qSlicerCoreApplication.cxx:138)&lt;br /&gt;
  31  libqSlicerBaseQTGUI.dylib     	0x000000010897a595 qSlicerApplicationPrivate::~qSlicerApplicationPrivate() + 261 (qSlicerApplication.cxx:157)&lt;br /&gt;
  32  libqSlicerBaseQTGUI.dylib     	0x000000010897a615 qSlicerApplicationPrivate::~qSlicerApplicationPrivate() + 21 (qSlicerApplication.cxx:157)&lt;br /&gt;
  33  libqSlicerBaseQTGUI.dylib     	0x000000010897a638 qSlicerApplicationPrivate::~qSlicerApplicationPrivate() + 24 (qSlicerApplication.cxx:146)&lt;br /&gt;
  34  libqSlicerBaseQTCore.dylib    	0x000000010b8a457e QScopedPointerDeleter&amp;lt;qSlicerCoreApplicationPrivate&amp;gt;::cleanup(qSlicerCoreApplicationPrivate*) + 46 (qscopedpointer.h:63)&lt;br /&gt;
  35  libqSlicerBaseQTCore.dylib    	0x000000010b8a4537 QScopedPointer&amp;lt;qSlicerCoreApplicationPrivate, QScopedPointerDeleter&amp;lt;qSlicerCoreApplicationPrivate&amp;gt; &amp;gt;::~QScopedPointer() + 39 (qscopedpointer.h:101)&lt;br /&gt;
  36  libqSlicerBaseQTCore.dylib    	0x000000010b8a1c25 QScopedPointer&amp;lt;qSlicerCoreApplicationPrivate, QScopedPointerDeleter&amp;lt;qSlicerCoreApplicationPrivate&amp;gt; &amp;gt;::~QScopedPointer() + 21 (qscopedpointer.h:102)&lt;br /&gt;
  37  libqSlicerBaseQTCore.dylib    	0x000000010b89ccca qSlicerCoreApplication::~qSlicerCoreApplication() + 42 (qSlicerCoreApplication.cxx:670)&lt;br /&gt;
  38  libqSlicerBaseQTGUI.dylib     	0x000000010897cda5 qSlicerApplication::~qSlicerApplication() + 21 (qSlicerApplication.cxx:316)&lt;br /&gt;
  39  libqSlicerBaseQTGUI.dylib     	0x000000010897cdc5 qSlicerApplication::~qSlicerApplication() + 21 (qSlicerApplication.cxx:316)&lt;br /&gt;
  40                                	0x00000001085bb989 (anonymous namespace)::SlicerAppMain(int, char**) + 4825&lt;br /&gt;
  41                                	0x00000001085ba6a2 main + 34&lt;br /&gt;
  42  libdyld.dylib                 	0x00007fff8b4bc5fd start + 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40850</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40850"/>
		<updated>2015-02-09T22:46:04Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
**First approach: install Miniconda manually and then build Slicer against it&lt;br /&gt;
&lt;br /&gt;
Assuming that we already installed Miniconda in the default folder ({HOME}/miniconda), we could build Slicer against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is also possible that you have to set another ones like:&lt;br /&gt;
&lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Besides, it is necessary to fix rpath in the library:&lt;br /&gt;
&lt;br /&gt;
  install_name_tool -id {HOME}/miniconda/lib/libpython2.7.dylib {HOME}/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
  Note: the paths have to be absolute, so you want to replace {HOME} for your home folder.&lt;br /&gt;
&lt;br /&gt;
**Second approach: to build a &amp;quot;SlicerPython&amp;quot; using Miniconda&lt;br /&gt;
I created a fork from Slicer to implement this approach, packaging Miniconda and installing it in a similar way that SlicerPython is used now. You can download the code in https://github.com/jonieva/Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes are in Superbuild/External_python.cmake file. There is a commented block that you can use to implement the first approach.&lt;br /&gt;
&lt;br /&gt;
However, at the moment I get a build error:&lt;br /&gt;
&lt;br /&gt;
  Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
  Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
  Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
    dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
    in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
  [ 10%] Built target CTKDICOMCore&lt;br /&gt;
  dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
    Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
    Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
  in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This problem can be &amp;quot;solved&amp;quot; if we replace the libsqlite3.dylib by a link to the /usr/lib/libsqlite3.dylib library. I have checked the current &amp;quot;SlicerPython&amp;quot; and it doesn't contain this library. Is there a conflict?&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40849</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40849"/>
		<updated>2015-02-09T00:48:59Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
**First approach: install Miniconda manually and then build Slicer against it&lt;br /&gt;
&lt;br /&gt;
Assuming that we already installed Miniconda in the default folder ({HOME}/miniconda), we could build Slicer against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is also possible that you have to set another ones like:&lt;br /&gt;
&lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Besides, it is necessary to fix rpath in the library:&lt;br /&gt;
&lt;br /&gt;
  install_name_tool -id {HOME}/miniconda/lib/libpython2.7.dylib {HOME}/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
  Note: the paths have to be absolute, so you want to replace {HOME} for your home folder.&lt;br /&gt;
&lt;br /&gt;
**Second approach: to build a &amp;quot;SlicerPython&amp;quot; using Miniconda&lt;br /&gt;
I created a fork from Slicer to implement this approach, packaging Miniconda and installing it in a similar way that SlicerPython is used now. You can download the code in https://github.com/jonieva/Slicer&lt;br /&gt;
&lt;br /&gt;
The only changes are in Superbuild/External_python.cmake file. There is a commented block that you can use to implement the first approach.&lt;br /&gt;
&lt;br /&gt;
However, at the moment I get a build error:&lt;br /&gt;
&lt;br /&gt;
Compiling python scripts: CTKScriptingPythonCore&lt;br /&gt;
Compiling python scripts: ctkSimplePythonShell&lt;br /&gt;
Linking CXX shared module ../../bin/CTKCorePythonQt.so&lt;br /&gt;
dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
 in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
[ 10%] Built target CTKDICOMCore&lt;br /&gt;
dyld: Symbol not found: _sqlite3_intarray_bind&lt;br /&gt;
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
  Expected in: /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/python-miniconda/lib/libsqlite3.dylib&lt;br /&gt;
 in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40829</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40829"/>
		<updated>2015-02-05T16:04:47Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME}/miniconda/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=${USER}/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40827</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40827"/>
		<updated>2015-02-04T22:16:11Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;${HOME} /miniconda/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export PYTHONPATH=&amp;quot;{HOME}/miniconda/:{HOME}/miniconda/lib/:{HOME}/miniconda/lib/python2.7/site-packages/:{HOME}/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :{HOME}/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/:{HOME}/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=/home/pieper/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40826</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40826"/>
		<updated>2015-02-04T20:26:44Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the moment there are also some additional actions to take, like setting some environment variables:  &lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
 /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Please have in mind that absolute paths are required, so just replace the paths with your appropriate settings.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0&lt;br /&gt;
&lt;br /&gt;
[[File:Slicer-conda-linux-2015-02-04.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=/home/pieper/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But after it ran there was slicer's build of numpy inside miniconda, so I needed to do this:&lt;br /&gt;
&lt;br /&gt;
 bin/conda uninstall numpy&lt;br /&gt;
 bin/conda install numpy&lt;br /&gt;
&lt;br /&gt;
I tried using this:&lt;br /&gt;
&lt;br /&gt;
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
but got this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
-- SuperBuild -         CTKAPPLAUNCHER[OK] (SYSTEM)&lt;br /&gt;
CMake Error at SuperBuild/External_CTKAPPLAUNCHER.cmake:21 (message):&lt;br /&gt;
  Enabling Slicer_USE_SYSTEM_CTKAPPLAUNCHER is not supported !&lt;br /&gt;
Call Stack (most recent call first):&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_python.cmake:21 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_VTKv6.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  SuperBuild/External_teem.cmake:11 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:561 (include)&lt;br /&gt;
  CMake/ExternalProjectDependency.cmake:607 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  SuperBuild.cmake:320 (ExternalProject_Include_Dependencies)&lt;br /&gt;
  CMakeLists.txt:599 (include)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- Configuring incomplet&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40820</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40820"/>
		<updated>2015-02-04T15:08:32Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Next step: isolating the Python console problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
SimpleITK is not properly installed, when I run miniconda interpreter and try to import it, I get an error:&lt;br /&gt;
&lt;br /&gt;
  import SimpleITK&lt;br /&gt;
  Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  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&lt;br /&gt;
  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&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
Other libraries like gitdb or numpy seem to work properly.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=/home/pieper/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I also checked that the Python console works inside Slicer, as long as I launch the Slicer binary from a terminal that has all these environment variables initialized.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40819</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40819"/>
		<updated>2015-02-04T15:07:03Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Next step: isolating the Python console problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
	-DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
	-DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
	-DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.dylib \&lt;br /&gt;
 	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 \&lt;br /&gt;
	-DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  \&lt;br /&gt;
	-DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
	-DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
	../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
SimpleITK is not properly installed, when I run miniconda interpreter and try to import it, I get an error:&lt;br /&gt;
&lt;br /&gt;
  import SimpleITK&lt;br /&gt;
  Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  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&lt;br /&gt;
  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&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
Other libraries like gitdb or numpy seem to work properly.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
The following worked for me (Steve Pieper, 2015-02-04) using ubuntu 13.10 and miniconda  3.8.4-py27_0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake \&lt;br /&gt;
  -DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake \&lt;br /&gt;
  -DPYTHON_EXECUTABLE:FILEPATH=${HOME}/miniconda/bin/python \&lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=${HOME}/miniconda/include/python2.7 \&lt;br /&gt;
  -DPYTHON_LIBRARY:FILEPATH=${HOME}/miniconda/lib/libpython2.7.so  \&lt;br /&gt;
  -DSlicer_BUILD_CLI:BOOL=OFF \&lt;br /&gt;
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF \&lt;br /&gt;
  ../Slicer&lt;br /&gt;
&lt;br /&gt;
make -j20&lt;br /&gt;
&lt;br /&gt;
export PYTHONHOME=/home/pieper/miniconda&lt;br /&gt;
&lt;br /&gt;
./Slicer-build/Slicer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. Even when I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin), I still got the same behavior. &lt;br /&gt;
Following JC advice (thanks!), I used '''instal_name_tool''' to add manually the rpath to libpython2.7.dylib:&lt;br /&gt;
  install_name_tool -id /Users/Jorge/miniconda/lib/libpython2.7.dylib /Users/Jorge/miniconda/lib/libpython2.7.dylib&lt;br /&gt;
&lt;br /&gt;
Voila! Now we can rebuild and the ctkSimplePythonShell will use the correct Python! However, we will have to set up some environment variables in order than all the libraries are found. I tried some of the most important and checked that they were properly loaded in the Python console, but we will need the same ones that we are adding when building the current &amp;quot;SlicerPython&amp;quot;:&lt;br /&gt;
  export PYTHONHOME=&amp;quot;/Users/Jorge/miniconda/&amp;quot;&lt;br /&gt;
  export PYTHONPATH=&amp;quot;/Users/Jorge/miniconda/:/Users/Jorge/miniconda/lib/:/Users/Jorge/miniconda/lib/python2.7/site-packages/:&lt;br /&gt;
  /Users/Jorge/miniconda/lib/python2.7/lib-dynload/&lt;br /&gt;
  :/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;br /&gt;
  export DYLD_LIBRARY_PATH=&amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/SimpleITK-build/lib/&lt;br /&gt;
  :/Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/&amp;quot;&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40804</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40804"/>
		<updated>2015-01-30T22:27:24Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* Future steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DPYTHON_EXECUTABLE:FILEPATH=/Users/Jorge/miniconda/bin/python &lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=/Users/Jorge/miniconda/include/python2.7 -DPYTHON_LIBRARY:FILEPATH=/Users/Jorge/miniconda/lib/libpython2.7.dylib &lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer&lt;br /&gt;
  /SDKs/MacOSX10.9.sdk  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; ../Slicer&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
SimpleITK is not properly installed, when I run miniconda interpreter and try to import it, I get an error:&lt;br /&gt;
&lt;br /&gt;
  import SimpleITK&lt;br /&gt;
  Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  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&lt;br /&gt;
  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&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
Other libraries like gitdb or numpy seem to work properly.&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. However, I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin) and still I get the same behaviour, so although it may be necessary to work on it, it doesn't seem to be the main cause of the problem.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40803</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40803"/>
		<updated>2015-01-30T22:10:38Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* 1: compile Slicer against miniconda */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==Compile Slicer against miniconda==&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DPYTHON_EXECUTABLE:FILEPATH=/Users/Jorge/miniconda/bin/python &lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=/Users/Jorge/miniconda/include/python2.7 -DPYTHON_LIBRARY:FILEPATH=/Users/Jorge/miniconda/lib/libpython2.7.dylib &lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer&lt;br /&gt;
  /SDKs/MacOSX10.9.sdk  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; ../Slicer&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
SimpleITK is not properly installed, when I run miniconda interpreter and try to import it, I get an error:&lt;br /&gt;
&lt;br /&gt;
  import SimpleITK&lt;br /&gt;
  Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  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&lt;br /&gt;
  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&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
Other libraries like gitdb or numpy seem to work properly.&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. However, I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin) and still I get the same behaviour, so although it may be necessary to work on it, it doesn't seem to be the main cause of the problem.&lt;br /&gt;
&lt;br /&gt;
== Future steps ==&lt;br /&gt;
I observed there is a big difference in the structure of the folders in the Slicer Python and Miniconda that could be affecting. There is a '''Libs''' folder inside the /Slicer-Superbuild-Debug/CTK-build/CTK-build that contain many classes that seem required to run a console that uses a Python version different than the system. &lt;br /&gt;
I hope that someone can guide me a little bit in this...&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40802</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40802"/>
		<updated>2015-01-30T22:10:17Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: /* 2: compile Slicer using System Python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==1: compile Slicer against miniconda==&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DPYTHON_EXECUTABLE:FILEPATH=/Users/Jorge/miniconda/bin/python &lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=/Users/Jorge/miniconda/include/python2.7 -DPYTHON_LIBRARY:FILEPATH=/Users/Jorge/miniconda/lib/libpython2.7.dylib &lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer&lt;br /&gt;
  /SDKs/MacOSX10.9.sdk  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; ../Slicer&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
SimpleITK is not properly installed, when I run miniconda interpreter and try to import it, I get an error:&lt;br /&gt;
&lt;br /&gt;
  import SimpleITK&lt;br /&gt;
  Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  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&lt;br /&gt;
  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&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
Other libraries like gitdb or numpy seem to work properly.&lt;br /&gt;
&lt;br /&gt;
== Compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. However, I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin) and still I get the same behaviour, so although it may be necessary to work on it, it doesn't seem to be the main cause of the problem.&lt;br /&gt;
&lt;br /&gt;
== Future steps ==&lt;br /&gt;
I observed there is a big difference in the structure of the folders in the Slicer Python and Miniconda that could be affecting. There is a '''Libs''' folder inside the /Slicer-Superbuild-Debug/CTK-build/CTK-build that contain many classes that seem required to run a console that uses a Python version different than the system. &lt;br /&gt;
I hope that someone can guide me a little bit in this...&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40801</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40801"/>
		<updated>2015-01-30T22:09:35Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: Status at 2015-01-30&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda. &lt;br /&gt;
&lt;br /&gt;
Note: the platform used is MacOSX 10.9.5 with XCode 6&lt;br /&gt;
&lt;br /&gt;
==1: compile Slicer against miniconda==&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake -DPYTHON_EXECUTABLE:FILEPATH=/Users/Jorge/miniconda/bin/python &lt;br /&gt;
  -DPYTHON_INCLUDE_DIR:PATH=/Users/Jorge/miniconda/include/python2.7 -DPYTHON_LIBRARY:FILEPATH=/Users/Jorge/miniconda/lib/libpython2.7.dylib &lt;br /&gt;
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer&lt;br /&gt;
  /SDKs/MacOSX10.9.sdk  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; ../Slicer&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
SimpleITK is not properly installed, when I run miniconda interpreter and try to import it, I get an error:&lt;br /&gt;
&lt;br /&gt;
  import SimpleITK&lt;br /&gt;
  Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  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&lt;br /&gt;
  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&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
Other libraries like gitdb or numpy seem to work properly.&lt;br /&gt;
&lt;br /&gt;
== 2: compile Slicer using System Python ==&lt;br /&gt;
In order to compare the behaviors, I also compiled another version of Slicer using my System Python:&lt;br /&gt;
&lt;br /&gt;
  ccmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/bin/qmake  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9  &lt;br /&gt;
  -DCMAKE_OSX_SYSROOT:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  &lt;br /&gt;
  -G  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; -DSlicer_USE_SYSTEM_python:BOOL=TRUE ../Slicer&lt;br /&gt;
&lt;br /&gt;
Checking my System Python folder, everything seems to be properly installed.&lt;br /&gt;
&lt;br /&gt;
== Common issues in Miniconda and System python == &lt;br /&gt;
There is a difference between executing '''Slicer-Superbuild/Slicer-build/bin/Slicer.app''' and '''Slicer-Superbuild/Slicer-build/Slicer''' when I open a Slicer Python console. In the former case, Slicer cannot find some libraries. When I open the console I get:&lt;br /&gt;
&lt;br /&gt;
  Python 2.7.5 (default, Mar  9 2014, 22:15:05) &lt;br /&gt;
  [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/Projects/BWH/Slicer-Superbuild-SystemPython/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/SimpleFilters.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import SimpleITK as sitk&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  ImportError: dlopen(/Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libSimpleITKBasicFilters12-0.9.1.dylib&lt;br /&gt;
  Referenced from: /Library/Python/2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.9-intel.egg/SimpleITK/_SimpleITK.so&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
If I run Slicer-Superbuild/Slicer-build/Slicer, everything seems to work fine.&lt;br /&gt;
&lt;br /&gt;
However, '''in both cases Slicer is loading my System python'''!&lt;br /&gt;
&lt;br /&gt;
== Next step: isolating the Python console problem ==&lt;br /&gt;
Following the advice of Steve Pieper, I tried to replicate the problem just in the CTK Python console, without running Slicer. To do that, I enabled the setting CTK_APP_ctkSimplePythonShell, inside Slicer-Superbuild/CTK-build/CTK-build. &lt;br /&gt;
I had exactly the same behavior that I had within Slicer.&lt;br /&gt;
&lt;br /&gt;
I tried to set exactly the same settings in my &amp;quot;Slicer Python&amp;quot; version and in my &amp;quot;Miniconda&amp;quot; version, replacing just the settings PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY. Still some behavior...&lt;br /&gt;
&lt;br /&gt;
In this process, I found out two things that are different in the &amp;quot;Slicer Python&amp;quot; and &amp;quot;Miniconda&amp;quot;:&lt;br /&gt;
:If I run otool in my ctkSimplePythonShell, there is a difference in libpython2.7.dylib&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell&lt;br /&gt;
  ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''/Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/python-install/lib/libpython2.7.dylib (compatibility version 0.0.0, current version 0.0.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Debug/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
~/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin$ otool -L ctkSimplePythonShell &lt;br /&gt;
 ctkSimplePythonShell:&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKVisualizationVTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKWidgets.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/QtTesting-build/libQtTesting.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKScriptingPythonCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkInteraction-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFiltersHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkOpenGL-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImagingHybrid-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkIO-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkTestingRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkRendering-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkFilters-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkalglib-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkverdict-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkftgl-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkfreetype-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)&lt;br /&gt;
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0)&lt;br /&gt;
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkImaging-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CMakeExternals/Install/lib/libPythonQt.dylib (compatibility version 0.0.0, current version 0.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkWrappingPython27Core-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtkCommon-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  '''libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)'''&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/VTKv6-build/lib/libvtksys-6.2.1.dylib (compatibility version 1.0.0, current version 1.0.0)&lt;br /&gt;
  /Users/Jorge/Projects/BWH/Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin/libCTKCore.0.1.dylib (compatibility version 0.1.0, current version 0.1.0)&lt;br /&gt;
  QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtSql.framework/Versions/4/QtSql (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)&lt;br /&gt;
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)&lt;br /&gt;
  /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)&lt;br /&gt;
&lt;br /&gt;
So, it looks like there is a problem with the rpath of the library. However, I tried to copy the python executable and the library itself to the same bin folder where the ctkSimplePython is (Slicer-Superbuild-Conda-Eclipse/CTK-build/CTK-build/bin) and still I get the same behaviour, so although it may be necessary to work on it, it doesn't seem to be the main cause of the problem.&lt;br /&gt;
&lt;br /&gt;
== Future steps ==&lt;br /&gt;
I observed there is a big difference in the structure of the folders in the Slicer Python and Miniconda that could be affecting. There is a '''Libs''' folder inside the /Slicer-Superbuild-Debug/CTK-build/CTK-build that contain many classes that seem required to run a console that uses a Python version different than the system. &lt;br /&gt;
I hope that someone can guide me a little bit in this...&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40800</id>
		<title>Documentation/Labs/SlicerCondaIntegration</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/Labs/SlicerCondaIntegration&amp;diff=40800"/>
		<updated>2015-01-30T21:03:24Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
Before attempting to use the whole Anaconda package, the first approach has been to use Miniconda, which is a reduced version of Anaconda.&lt;br /&gt;
&lt;br /&gt;
==1: compile Slicer against miniconda==&lt;br /&gt;
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  &amp;quot;Eclipse CDT4 - Unix Makefiles&amp;quot; ../Slicer-Conda&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
&lt;br /&gt;
SimpleITK is not properly installed, when I run miniconda interpreter and try to import it, I get an error:&lt;br /&gt;
&lt;br /&gt;
  import SimpleITK&lt;br /&gt;
  Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from .SimpleITK import *&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 28, in &amp;lt;module&amp;gt;&lt;br /&gt;
    _SimpleITK = swig_import_helper()&lt;br /&gt;
  File &amp;quot;/Users/Jorge/miniconda/lib/python2.7/site-packages/SimpleITK-0.9.0.dev656-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py&amp;quot;, line 24, in swig_import_helper&lt;br /&gt;
    _mod = imp.load_module('_SimpleITK', fp, pathname, description)&lt;br /&gt;
  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&lt;br /&gt;
  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&lt;br /&gt;
  Reason: image not found&lt;br /&gt;
&lt;br /&gt;
However, other libraries like gitdb or numpy seem to work properly.&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/tjonieva&amp;diff=40799</id>
		<title>Documentation/tjonieva</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/tjonieva&amp;diff=40799"/>
		<updated>2015-01-30T20:23:15Z</updated>

		<summary type="html">&lt;p&gt;Jonieva: Created page with 'I'm editing'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm editing&lt;/div&gt;</summary>
		<author><name>Jonieva</name></author>
		
	</entry>
</feed>