<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Yes your initial problem was the ldconfig one.<div><div>I’m glad it works for you now.</div><div><br></div><div>Yes please if you have some notes on the protocol for Ubuntu, just send it to the list</div><div>so that I can update it on the wiki.</div><div><br></div><div>Michka<br><div><br><div><div>On 23 août 2014, at 16:08, gowith king <<a href="mailto:gowithking@googlemail.com">gowithking@googlemail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>That means the mismatching is not really matter and the essential problem is the valence of idconfig activation.<br> So I will write a summary to end our discussion to emailling list and recommend your wrapping protocol, which should also work on Ubuntu.<br>
</div><div>have a nice weekend. <br></div> <br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 23, 2014 at 3:41 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>update :<br></div>following Mr. Popoff 's instruction, I add these few command to active ldconfig<br>
<ul><li> cd /etc/ld.so.conf.d/
</li><li> add a file called itk-46.conf, which should contain only one line: /usr/local/lib
</li><li> ldconfig # tells the system to read the files in ld.so.conf.d
</li><li>then python <br></li><li>import itk</li><li>itk.image <br></li><li>lots warning reported :</li><li>Warning: Unknown parameter 'itk::Matrix< float, 2, 2 >' in template 'itk::VectorContainer'<br>
Warning: Unknown parameter 'itk::Matrix< double, 2, 2 >' in template 'itk::VectorContainer'<br>Warning: Unknown parameter 'itk::Matrix< float, 3, 3 >' in template 'itk::VectorContainer'<br>
Warning: Unknown parameter 'itk::Matrix< double, 3, 3 >' in template 'itk::VectorContainer'<br>Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::PointSet'<br>
Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::PointSet'<br>Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::PointSet'<br>
Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::PointSet'<br>Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,2,2,double,double,double >' in template 'itk::PointSet'<br>
Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< double,3,3,double,double,double >' in template 'itk::PointSet'<br>Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix <double,2,2>,2,2,float,float,itk::Matrix <double,2,2> >' in template 'itk::PointSet'<br>
Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< itk::Matrix <double,3,3>,3,3,float,float,itk::Matrix <double,3,3> >' in template 'itk::PointSet'<br>Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,2,2,float,float >' in template 'itk::Mesh'<br>
Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,2,2,float,float >' in template 'itk::Mesh'<br>Warning: Unknown parameter 'itk::DefaultStaticMeshTraits< float,3,3,float,float >' in template 'itk::Mesh'<br>
Warning: Unknown parameter 'itk::DefaultDynamicMeshTraits< float,3,3,float,float >' in template 'itk::Mesh'<br>Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer'<br>
Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer'<br>
Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer'<br>
Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::MapContainer'<br>
Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer'<br>
Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer'<br>
Warning: Unknown parameter 'itk::CellInterface< float, itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer'<br>
Warning: Unknown parameter 'itk::CellInterface< double, itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > > > *' in template 'itk::VectorContainer'<br>
Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor'<br>
Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor'<br>
Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor'<br>
Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterfaceVisitor'<br>
Warning: Unknown parameter 'itk::CellTraitsInfo< 2,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,2 >,itk::MapContainer< unsigned long,itk::Point< float,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface'<br>
Warning: Unknown parameter 'itk::CellTraitsInfo< 2,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,2 >,itk::MapContainer< unsigned long,itk::Point< double,2 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface'<br>
Warning: Unknown parameter 'itk::CellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned long,itk::Point< float,3 >,itk::MapContainer< unsigned long,itk::Point< float,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface'<br>
Warning: Unknown parameter 'itk::CellTraitsInfo< 3,double,double,unsigned long,unsigned long,unsigned long,itk::Point< double,3 >,itk::MapContainer< unsigned long,itk::Point< double,3 > >, std::set< unsigned long, std::less< unsigned long > > >' in template 'itk::CellInterface'<br>
Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultStaticMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter'<br>Warning: Unknown parameter 'itk::Mesh< float,2,itk::DefaultDynamicMeshTraits< float,2,2,float > >' in template 'itk::MeshToMeshFilter'<br>
Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultStaticMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter'<br>Warning: Unknown parameter 'itk::Mesh< float,3,itk::DefaultDynamicMeshTraits< float,3,3,float > >' in template 'itk::MeshToMeshFilter'<br>
<br></li></ul><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 22, 2014 at 6:13 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>I recorded my procedure as follow:<br></div><code></code>cd ~<code><br>git clone git://<a href="http://itk.org/ITK.git" target="_blank">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><div> 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></div>
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):<div><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></div></code></div><code></code><code></code><dl>
<dt><br></dt></dl><br></div><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>Please keep the discussion on the mailing list :)<br><br></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><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><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>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><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 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><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>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><blockquote type="cite"><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>
_______________________________________________<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></blockquote></div><br></div>
</div></blockquote></div><br></div>
</div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</blockquote></div><br></div></div></div></body></html>