[Insight-users] ITK in Python

Erik Anderson eranders at sci.utah.edu
Mon Sep 25 14:55:35 EDT 2006


Hi all,
    I have successfully built ITK and WrapITK with (I think) the proper 
CMake options set.  In a Python shell, I am able to successfully import 
itk via

import itk

using dir on the module gives me a list of all the wrappings I would 
expect, however, upon instantiation of a class I get the following type 
of error:

 >>> f = itk.AcosImageFilter
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/scratch/eranders/env/itk/Wrapping/WrapITK/Python/itkLazy.py", 
line 18, in __getattribute__
    itkBase.LoadModule(module, namespace)
  File "/scratch/eranders/env/itk/Wrapping/WrapITK/Python/itkBase.py", 
line 77, in LoadModule
    LoadModule(dep, namespace)
  File "/scratch/eranders/env/itk/Wrapping/WrapITK/Python/itkBase.py", 
line 77, in LoadModule
    LoadModule(dep, namespace)
  File "/scratch/eranders/env/itk/Wrapping/WrapITK/Python/itkBase.py", 
line 85, in LoadModule
    if not swigModuleName in sys.modules: module = 
loader.load(swigModuleName)
  File "/scratch/eranders/env/itk/Wrapping/WrapITK/Python/itkBase.py", 
line 191, in load
    fp, pathname, description = imp.find_module(name)
ImportError: No module named VXLNumericsPython

My environment is as follows:

Python 2.4 on Suse 10.1
itk 2.8 built from CVS with WrapITK

Environment variables set:
LD_LIBRARY_PATH = /usr/local/itk/bin
PYTHONPATH=/usr/local/itk/Wrapping/WrapITK/Python

Any help would be great.

Thansk,
Erik Anderson




More information about the Insight-users mailing list