[ITK] Fwd: ITK and python wrap problem

Michka Popoff michkapopoff at gmail.com
Fri Aug 22 10:15:57 EDT 2014


Hi

Some important questions first:

What was the warning for the library mismatch ?
On what OS are you installing ?
Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ?

If the warnings were about the python library, it is quite important.
It may happen that you have two different python installations, and cmake is not able to find the right libraries.

I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora
There is a list of cmake flags you can set to help cmake find the right python, if it’s the problem you had.
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.
For other OS’es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this)

Feedback is welcome so I can improve the installation instructions :)

Michka

On 22 août 2014, at 16:06, gowith king <gowithking at googlemail.com> wrote:

> 
> 
> ---------- Forwarded message ----------
> From: gowith king <gowithking at googlemail.com>
> Date: Fri, Aug 22, 2014 at 1:32 PM
> Subject: ITK and python wrap problem
> To: community at itk.org
> 
> 
> Dear ITK friends
>       I am not sure this is an appropriate place to issue my problem in the wrapping  process:
>       I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' 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. 
>       Then I tried one line for test :
> >>> import itk 
> >>> inputimage=itk.Image[itk.UC,3]
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__
>     itkBase.LoadModule(module, namespace)
>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule
>     LoadModule(dep, namespace)
>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule
>     LoadModule(dep, namespace)
>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule
>     LoadModule(dep, namespace)
>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule
>     LoadModule(dep, namespace)
>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule
>     module = loader.load(swigModuleName)
>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load
>     return imp.load_module(name, fp, pathname, description)
>   File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in <module>
>     _ITKCommonPython = swig_import_helper()
>   File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper
>     _mod = imp.load_module('_ITKCommonPython', fp, pathname, description)
> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory
> 
> I got totally lost for this, what should I do to fix this?
> Any suggestion would be appreciated
> 
>        
>     
> 
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140822/9d9d84de/attachment-0002.html>


More information about the Community mailing list