[Insight-users] ITK V4.0.0 with Python Wrapping

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Feb 9 03:55:13 EST 2012


Le 9 févr. 12 à 09:45, Mathieu Stumpf a écrit :

> Le mercredi 08 février 2012 à 17:54 +0100, Gaëtan Lehmann a écrit :
>> Look at /etc/ld.so.conf and maybe /etc/ld.so.conf.d/*
>>
>> All the default library path should be listed there.
>>
>> Regards,
>>
>> Gaëtan
>>
>
> It seems ok :
>        $ cat /etc/ld.so.conf /etc/ld.so.conf.d/*
>        include /etc/ld.so.conf.d/*.conf
>
>        # libc default configuration
>        /usr/local/lib
>        # Multiarch support
>        /lib/x86_64-linux-gnu
>        /usr/lib/x86_64-linux-gnu
>

good

> Now I tried again with the git version, but the result seems the same.
>
> My env :
>        export ITKWRAPPEDINSTALLED=/usr/local/lib/cmake/ITK-4.1/ 
> WrapITK/
>        export LD_LIBRARY_PATH=$ITKWRAPPEDINSTALLED: 
> $ITKWRAPPEDINSTALLED/WrapITK/lib:/usr/local/lib/vtk-5.8/
>        export PYTHONPATH=$ITKWRAPPEDINSTALLED/WrapITK/lib/: 
> $ITKWRAPPEDINSTALLED/WrapITK/Python/
>

You shouldn't have all those paths. I'm even quite sure they are not  
correct, like

   /usr/local/lib/cmake/ITK-4.1/WrapITK/WrapITK/lib

Note the double WrapITK, and the absence of any lib in /usr/local/lib/ 
cmake/ITK-4.1/

> What is in the dir :
>        $ ls /usr/local/lib/cmake/ITK-4.1/WrapITK/
>        Configuration  WrapITKConfig.cmake
>
> Script to test :
>        $ cat 0tuto.py
>        #!/usr/bin/python
>        import itk
>        reader1 =  
> itk.ImageFileReader.IUC2.New(FileName="CellsFluorescence1.png")
>        image1  = reader1.GetOutput()
>
> Result :
>        $ ./0tuto.py
>        PySwigIterator not found in module ITKPyBase because of  
> exception:
>         'module' object has no attribute 'PySwigIterator'
>        PySwigIterator not found in module ITKPyBase because of  
> exception:
>         'module' object has no attribute 'PySwigIterator'
>        Traceback (most recent call last):
>          File "./0tuto.py", line 6, in <module>
>            reader1 =  
> itk.ImageFileReader.IUC2.New(FileName="CellsFluorescence1.png")
>          File "/usr/local/lib/ITK-4.1/Python/itkLazy.py", line 37,  
> in __getattribute__
>            itkBase.LoadModule(module, namespace)
>          File "/usr/local/lib/ITK-4.1/Python/itkBase.py", line 95,  
> in LoadModule
>            LoadModule(dep, namespace)
>          File "/usr/local/lib/ITK-4.1/Python/itkBase.py", line 103,  
> in LoadModule
>            if not swigModuleName in sys.modules: module =  
> loader.load(swigModuleName)
>          File "/usr/local/lib/ITK-4.1/Python/itkBase.py", line 214,  
> in load
>            return imp.load_module(name, fp, pathname, description)
>          File "/usr/local/lib/ITK-4.1/Python/ITKCommonPython.py",  
> line 30, in <module>
>            _ITKCommonPython = swig_import_helper()
>          File "/usr/local/lib/ITK-4.1/Python/ITKCommonPython.py",  
> line 26, in swig_import_helper
>            _mod = imp.load_module('_ITKCommonPython', fp, pathname,  
> description)
>        ImportError: libitksys-4.1.so.1: cannot open shared object  
> file: No such file or directory
>
>
> I welcome any other idea.


Have you run

   ldconfig

as root?

Regards,

Gaëtan


-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://mima2.jouy.inra.fr  http://www.itk.org
http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120209/85dd4cab/attachment.pgp>


More information about the Insight-users mailing list