<div dir="ltr"><div><div>I recorded my procedure as follow:<br></div><code></code>cd ~<code><br>git clone git://<a href="http://itk.org/ITK.git">itk.org/ITK.git</a></code><code><br>cd ITK<br>git pull<br></code></div><div><code>mkdir BUILD<br>
</code></div><div><code>cd BUILD<br></code></div><div><code>ccmake ..<br></code></div><div><code>in the ccmake configure options the follow flags were selected:<br>BUILD_EXAMPLES OFF <br>
BUILD_SHARED_LIBS ON <br> BUILD_TESTING OFF <br> CMAKE_BUILD_TYPE Release <br>ITK_WRAP_PERL OFF <br>
ITK_WRAP_PYTHON ON <br>PERL_EXECUTABLE /usr/bin/perl <br> PYTHON_EXECUTABLE /usr/bin/python <br> PYTHON_INCLUDE_DIR /usr/include/python2.7 <br>
PYTHON_LIBRARY /usr/lib/<a href="http://libpython2.7.so">libpython2.7.so</a> <br> PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages <br> SCPCOMMAND /usr/bin/scp <br>
<br></code></div><div><code>Then the configure warning of executable and library mismatch comes, ignore the warning <br></code></div><div><code>g to generation <br></code></div><div><code>sudo make <br></code></div><div><code>sudo make install <br>
</code></div><div><code><br></code></div><div><code>for the test :<br></code></div><div><code>python <br></code></div><div><code>>>>import itk <br>>>> inputimage=itk.Image[itk.UC,3] --- errors report here : <br>
in eclispe : undefined variable from import UC <br></code></div><div><code>in terminal :Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br> File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__<br>
itkBase.LoadModule(module, namespace)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule<br> LoadModule(dep, namespace)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule<br>
LoadModule(dep, namespace)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule<br> LoadModule(dep, namespace)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule<br>
LoadModule(dep, namespace)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule<br> module = loader.load(swigModuleName)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load<br>
return imp.load_module(name, fp, pathname, description)<br> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in <module><br> _ITKCommonPython = swig_import_helper()<br> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper<br>
_mod = imp.load_module('_ITKCommonPython', fp, pathname, description)<br>ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory<br><br><br></code></div><code></code><code></code><dl>
<dt><br></dt></dl><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 22, 2014 at 5:55 PM, gowith king <span dir="ltr"><<a href="mailto:gowithking@googlemail.com" target="_blank">gowithking@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class=""><div>Please keep the discussion on the mailing list :)<br><br></div></div>This is my first post in mailing list system " if this is a sort of system, :)" <br>
</div>I guess that means I should always do not forget to cc to community? or what else should I do to keep it?<br>
<br><div><div><div><div><div class=""><div><br></div><div>Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice.</div><div><br><br></div></div><div>I have no idea Howto identify the python2.7.3 working library, normally they are lots of .pyr files in the folder of /usr/lib/python2.7 . I find a similar .so file in /usr/lib/<a href="http://libpython2.7.so" target="_blank">libpython2.7.so</a> . <br>
</div><div>However in your instruction :PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0<br></div><div>The file "libpython2.7.so.1.0" also present in the same path : /usr/lib/<a href="http://libpython2.7.so" target="_blank">libpython2.7.so</a>.1.0 ; should I use this file?<br>
</div><div class=""><div><br>I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure.<br><br></div></div><div>How could I send you the path of ubuntu 12.04? I can try to switch on a remote assistant if necessary. <br>
<br></div><div class=""><div><br></div><div>Seems on ubuntu the procedure is the same for loading the shared libraries:</div><div><a href="http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib" target="_blank">http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib</a></div>
<div>On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig.<br></div><div> </div></div></div></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Aug 22, 2014 at 5:30 PM, Michka Popoff <span dir="ltr"><<a href="mailto:michkapopoff@gmail.com" target="_blank">michkapopoff@gmail.com</a>></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">Please keep the discussion on the mailing list :)<div><br></div><div>Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice.</div>
<div>I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure.</div><div><br></div><div>Seems on ubuntu the procedure is the same for loading the shared libraries:</div>
<div><a href="http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib" target="_blank">http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib</a></div><div>On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig.</div>
<span><font color="#888888"><div><br></div><div>Michka</div></font></span><div><div><div><br><div><div>On 22 août 2014, at 17:21, gowith king <<a href="mailto:gowithking@googlemail.com" target="_blank">gowithking@googlemail.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr"><div><div>Dear Popoff <br></div> I am using Ubuntu 12.04 LTS. the warning is the mismatching of python library and python executable : python executable "2.7.3" and library "" is mismatched. Here is the option setting:<br>
<br><br>PYTHON_EXECUTABLE /usr/bin/python <br> PYTHON_INCLUDE_DIR /usr/include/python2.7 <br> PYTHON_LIBRARY /usr/lib/<a href="http://libpython2.7.so/" target="_blank">libpython2.7.so</a> <br>
PY_SITE_PACKAGES_PATH /usr/lib/python2.7/dist-packages <br><br></div><div>The <a href="http://libitkvnl_algo-4.7.so/" target="_blank">libitkvnl_algo-4.7.so</a> file exist in /usr/local/lib . <br><br>
</div>
<div>I do have few python versions been installed in the same OS. <br></div><div>The flags in the instruction of '<a href="http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation" target="_blank">http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation</a>' are not exact as the same as the description. I will try your instruction step be step in my system. <br>
</div><div>By the way, your instruction is so practical.<br><br></div><div>Have a nice day. <br></div><div><br></div> <br><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff <span dir="ltr"><<a href="mailto:michkapopoff@gmail.com" target="_blank">michkapopoff@gmail.com</a>></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">Hi<div><br></div><div>Some important questions first:</div><div><br></div><div>What was the warning for the library mismatch ?</div>
<div>On what OS are you installing ?</div><div>Is the <a href="http://libitkvnl_algo-4.7.so/" target="_blank">libitkvnl_algo-4.7.so</a> file present in /usr/local/lib ?</div><div><br></div><div>If the warnings were about the python library, it is quite important.</div>
<div>It may happen that you have two different python installations, and cmake is not able to find the right libraries.</div><div><br></div><div>I wrote some instructions to install ITK with python wrapping on Fedora <a href="http://www.itk.org/Wiki/ITK/WrapITKInstallFedora" target="_blank">http://www.itk.org/Wiki/ITK/WrapITKInstallFedora</a></div>
<div>There is a list of cmake flags you can set to help cmake find the right python, if it’s the problem you had.</div><div>I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down.</div>
<div>For other OS’es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this)</div><div><br></div><div>Feedback is welcome so I can improve the installation instructions :)</div>
<div><br></div><div>Michka</div><div><br><div><div><div><div>On 22 août 2014, at 16:06, gowith king <<a href="mailto:gowithking@googlemail.com" target="_blank">gowithking@googlemail.com</a>> wrote:</div><br>
</div></div><blockquote type="cite"><div><div><div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">gowith king</b> <span dir="ltr"><<a href="mailto:gowithking@googlemail.com" target="_blank">gowithking@googlemail.com</a>></span><br>
Date: Fri, Aug 22, 2014 at 1:32 PM<br>Subject: ITK and python wrap problem<br>To: <a href="mailto:community@itk.org" target="_blank">community@itk.org</a><br><br><br><div dir="ltr"><div><div><div>Dear ITK friends<br></div>
I am not sure this is an appropriate place to issue my problem in the wrapping process:<br>
</div> I followed the instruction of '<a href="http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation" target="_blank">http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation</a>' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. <br>
</div><div> Then I tried one line for test :<br>>>> import itk <br>>>> inputimage=itk.Image[itk.UC,3]<br>Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br>
File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__<br> itkBase.LoadModule(module, namespace)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule<br>
LoadModule(dep, namespace)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule<br> LoadModule(dep, namespace)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule<br>
LoadModule(dep, namespace)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule<br> LoadModule(dep, namespace)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule<br>
module = loader.load(swigModuleName)<br> File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load<br> return imp.load_module(name, fp, pathname, description)<br> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in <module><br>
_ITKCommonPython = swig_import_helper()<br> File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper<br> _mod = imp.load_module('_ITKCommonPython', fp, pathname, description)<br>
ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory<br><br></div><div>I got totally lost for this, what should I do to fix this?<br></div><div>Any suggestion would be appreciated<br>
<br> <br></div><div> <br></div></div>
</div><br></div></div></div>
_______________________________________________<br>Community mailing list<br><a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br><a href="http://public.kitware.com/mailman/listinfo/community" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br>
</blockquote></div><br></div></div></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>