[prev in list] [next in list] [prev in thread] [next in thread] 

List:       insight-users
Subject:    Re: [ITK-users] Fwd: using simpleITK with anaconda python distribution
From:       Bradley Lowekamp <brad () lowekamp ! net>
Date:       2014-09-14 1:51:48
Message-ID: 358E123A-966E-4C49-B2ED-9EC69B663C37 () mail ! nih ! gov
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Great to hear you got it working!!!

I'll add a FAQ with specific instruction and some of the lessons learned here. 

Brad

> On Sep 13, 2014, at 8:20 PM, Vishwa <vishwanath.somashekar@gmail.com> wrote:
> 
> It finally worked with the conda install --use-local simpleitk command.
> 
> Thanks everyone
> 
> Regards,
> vishwa
> 
> > On Sat, Sep 13, 2014 at 2:36 PM, Vishwa <vishwanath.somashekar@gmail.com> wrote:
> > I didn't remove it. How exactly do I do that? Also, from which folder should i \
> > run the conda install --use-local simpleitk command.  
> > I changed to conda recipes folder and issued the command. I got an error
> > 
> > conda install --use-local simpleitk
> > Fetching package metadata: ...Error: Could not find URL: \
> > file:///Users/dagarshali/anaconda/conda-bld/osx-64/ 
> > 
> > > On Sat, Sep 13, 2014 at 12:00 PM, Bradley Lowekamp <blowekamp@mail.nih.gov> \
> > > wrote: 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@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@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?
> 


[Attachment #5 (text/html)]

<html><head><meta http-equiv="content-type" content="text/html; \
charset=utf-8"></head><body dir="auto"><div>Great to hear you got it \
working!!!</div><div><br></div><div>I'll add a FAQ with specific instruction and some \
of the lessons learned here.&nbsp;</div><div><br></div><div>Brad</div><div><br>On Sep \
13, 2014, at 8:20 PM, Vishwa &lt;<a \
href="mailto:vishwanath.somashekar@gmail.com">vishwanath.somashekar@gmail.com</a>&gt; \
wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" \
content="text/html; charset=utf-8"><div dir="ltr">It finally worked with the conda \
install --use-local simpleitk command.<div><br></div><div>Thanks \
everyone</div><div><br></div><div>Regards,</div><div>vishwa</div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 13, 2014 at 2:36 PM, \
Vishwa <span dir="ltr">&lt;<a href="mailto:vishwanath.somashekar@gmail.com" \
target="_blank">vishwanath.somashekar@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">I didn't remove it. How exactly do I do that? \
Also, from which folder should i run the conda install --use-local simpleitk \
command.&nbsp;<div><br></div><div>I changed to conda recipes folder and issued the \
command. I got an error</div><div><br></div><div>&nbsp;conda install --use-local \
simpleitk</div>








<p>Fetching package metadata: ...Error: Could not find URL: \
file:///Users/dagarshali/anaconda/conda-bld/osx-64/</p></div><div class="HOEnZb"><div \
class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 13, 2014 \
at 12:00 PM, Bradley Lowekamp <span dir="ltr">&lt;<a \
href="mailto:blowekamp@mail.nih.gov" \
target="_blank">blowekamp@mail.nih.gov</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div style="word-wrap:break-word">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.&nbsp;<div><br></div><div>Brad<div><div><br><div><div>On Sep 12, 2014, at \
10:52 PM, Vishwa &lt;<a href="mailto:vishwanath.somashekar@gmail.com" \
target="_blank">vishwanath.somashekar@gmail.com</a>&gt; wrote:</div><br><blockquote \
type="cite"><div dir="ltr"><div class="gmail_extra"><span \
style="font-family:arial,sans-serif;font-size:13.333333969116211px">Hi \
Brad,</span><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">Thanks \
for all the help. I tried the conda install --use-local simpleitk from the \
conda-recipes folder. It didn't seem to matter..</div><div \
style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13.333333969116211px">Here is the thing \
that I noticed..</div><div \
style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13.333333969116211px">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.</div><div \
style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13.333333969116211px"><span><div>&gt;&gt;import \
SimpleITK as sitk</div><div>Traceback (most recent call last):</div><div>&nbsp; File \
"&lt;stdin&gt;", line 1, in &lt;module&gt;</div><div>&nbsp; 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 &lt;module&gt;</div><div>&nbsp; &nbsp; from .SimpleITK import \
*</div><div>&nbsp; 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 &lt;module&gt;</div><div>&nbsp; &nbsp; _SimpleITK = \
swig_import_helper()</div><div>&nbsp; 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</div><div>&nbsp; &nbsp; _mod = \
imp.load_module('_SimpleITK', fp, pathname, \
description)</div></span><div>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</div><span><div>&nbsp; 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</div><div>&nbsp; \
Reason: image not found</div></span></div><div \
style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13.333333969116211px">Any \
suggestions?</div><div \
style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div \
class="gmail_quote">On Fri, Sep 12, 2014 at 6:59 PM, Vishwa <span dir="ltr">&lt;<a \
href="mailto:vishwanath.somashekar@gmail.com" \
target="_blank">vishwanath.somashekar@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
dir="ltr">Hi Brad,<div>Thanks for all the help. I tried the conda install --use-local \
simpleitk from the conda-recipes folder. It didn't seem to \
matter..</div><div><br></div><div>Here is the thing that I \
noticed..</div><div><br></div><div>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.</div><div><br></div><div><span><div>&gt;&gt;import SimpleITK as \
sitk</div><div>Traceback (most recent call last):</div><div>&nbsp; File \
"&lt;stdin&gt;", line 1, in &lt;module&gt;</div><div>&nbsp; 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 &lt;module&gt;</div><div>&nbsp; &nbsp; from .SimpleITK import \
*</div><div>&nbsp; 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 &lt;module&gt;</div><div>&nbsp; &nbsp; _SimpleITK = \
swig_import_helper()</div><div>&nbsp; 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</div><div>&nbsp; &nbsp; _mod = \
imp.load_module('_SimpleITK', fp, pathname, \
description)</div></span><div>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</div><span><div>&nbsp; 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</div><div>&nbsp; \
Reason: image not found</div></span></div><div><br></div><div>Any \
suggestions?</div></div></blockquote></div><br><br></div></div> \
</blockquote></div><br></div></div></div></div></blockquote></div><br></div> \
</div></div></blockquote></div><br></div> </div></blockquote></body></html>



_____________________________________
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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic