[ITK] [ITK-users] Fwd: using simpleITK with anaconda python distribution

Bradley Lowekamp blowekamp at mail.nih.gov
Sat Sep 13 13:00:50 EDT 2014


Did you remove the installed SimpleITK from the setup.py script before running "const install --use-local simpleitk". I am guessing conda didn't install simpleitk correctly because of the old version manually installed. 

Brad
On Sep 12, 2014, at 10:52 PM, Vishwa <vishwanath.somashekar at gmail.com> wrote:

> Hi Brad,
> Thanks for all the help. I tried the conda install --use-local simpleitk from the conda-recipes folder. It didn't seem to matter..
> 
> Here is the thing that I noticed..
> 
> If I add the path of the lib (~/anaconda/lib) to DYLD_LIBRARY_PATH, then i can get it to work from the python that's invoked from the terminal. However, when I try the same thing from the notebook or from spyder, I get the following error.
> 
> >>import SimpleITK as sitk
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.8.0.post29-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py", line 1, in <module>
>     from .SimpleITK import *
>   File "/Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.8.0.post29-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py", line 28, in <module>
>     _SimpleITK = swig_import_helper()
>   File "/Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.8.0.post29-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py", line 24, in swig_import_helper
>     _mod = imp.load_module('_SimpleITK', fp, pathname, description)
> ImportError: dlopen(/Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.8.0.post29-py2.7-macosx-10.5-x86_64.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libpng15.15.dylib
>   Referenced from: /Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.8.0.post29-py2.7-macosx-10.5-x86_64.egg/SimpleITK/_SimpleITK.so
>   Reason: image not found
> 
> Any suggestions?
> 
> 
> On Fri, Sep 12, 2014 at 6:59 PM, Vishwa <vishwanath.somashekar at gmail.com> wrote:
> Hi Brad,
> Thanks for all the help. I tried the conda install --use-local simpleitk from the conda-recipes folder. It didn't seem to matter..
> 
> Here is the thing that I noticed..
> 
> If I add the path of the lib (~/anaconda/lib) to DYLD_LIBRARY_PATH, then i can get it to work from the python that's invoked from the terminal. However, when I try the same thing from the notebook or from spyder, I get the following error.
> 
> >>import SimpleITK as sitk
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.8.0.post29-py2.7-macosx-10.5-x86_64.egg/SimpleITK/__init__.py", line 1, in <module>
>     from .SimpleITK import *
>   File "/Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.8.0.post29-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py", line 28, in <module>
>     _SimpleITK = swig_import_helper()
>   File "/Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.8.0.post29-py2.7-macosx-10.5-x86_64.egg/SimpleITK/SimpleITK.py", line 24, in swig_import_helper
>     _mod = imp.load_module('_SimpleITK', fp, pathname, description)
> ImportError: dlopen(/Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.8.0.post29-py2.7-macosx-10.5-x86_64.egg/SimpleITK/_SimpleITK.so, 2): Library not loaded: libpng15.15.dylib
>   Referenced from: /Users/dagarshali/anaconda/lib/python2.7/site-packages/SimpleITK-0.8.0.post29-py2.7-macosx-10.5-x86_64.egg/SimpleITK/_SimpleITK.so
>   Reason: image not found
> 
> Any suggestions?
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140913/65ba9d6d/attachment-0002.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list