[Insight-users] ITK V4.0.0 with Python Wrapping
Mathieu Stumpf
mathieu.stumpf at etu.unistra.fr
Thu Feb 9 03:45:49 EST 2012
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
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/
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.
Kind regards,
Mathieu
More information about the Insight-users
mailing list