[Insight-users] need help using itk with python

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Mar 15 15:26:14 EST 2007


can you run the command

   ctest -C Release -R Python

and send the result ?

Thanks,

Gaetan


Le Thu, 15 Mar 2007 21:04:04 +0100, Matei Stroila  
<matei.stroila at gmail.com> a écrit:

> I did a clean build in Release mode (InsightToolkit-3.2.0) with
> WrapITK ON, VS 2005.
> Using WrapITK, it gives the same error:
>
> D:\Documents and Settings\mstroila>python
> Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit  
> (Intel)] on win
> 32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import itk
>>>> reader = itk.ImageFileReader[itk.UC,2].New()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File  
> "D:\build\InsightToolkit-3.2.0-bin\Wrapping\WrapITK\Python\Release\itkLaz
> y.py", line 18, in __getattribute__
>     itkBase.LoadModule(module, namespace)
>   File  
> "D:\build\InsightToolkit-3.2.0-bin\Wrapping\WrapITK\Python\Release\itkBas
> e.py", line 77, in LoadModule
>     LoadModule(dep, namespace)
>   File  
> "D:\build\InsightToolkit-3.2.0-bin\Wrapping\WrapITK\Python\Release\itkBas
> e.py", line 77, in LoadModule
>     LoadModule(dep, namespace)
>   File  
> "D:\build\InsightToolkit-3.2.0-bin\Wrapping\WrapITK\Python\Release\itkBas
> e.py", line 85, in LoadModule
>     if not swigModuleName in sys.modules: module =  
> loader.load(swigModuleName)
>   File  
> "D:\build\InsightToolkit-3.2.0-bin\Wrapping\WrapITK\Python\Release\itkBas
> e.py", line 192, in load
>     return imp.load_module(name, fp, pathname, description)
>   File  
> "D:\build\InsightToolkit-3.2.0-bin\bin\Release\VXLNumericsPython.py", lin
> e 5, in <module>
>     import _VXLNumericsPython
> ImportError: No module named _VXLNumericsPython
>
> Thanks for help,
>
> Matei
>
> On 3/15/07, Matei Stroila <matei.stroila at gmail.com> wrote:
>> On 3/15/07, Gaetan Lehmann <gaetan.lehmann at jouy.inra.fr> wrote:
>> > Can you verify that your PYTHONPATH contain the path to the dll files  
>> ?
>>
>> I did add it with no success. Same error message.
>>
>> I will look at WrapITK.
>>
>> Thanks,
>>
>> Matei
>>
>> >
>> > Thanks,
>> >
>> > Gaetan
>> >
>> > PS: It will not fix your problem, but if your intersted in using itk  
>> with
>> > python, you should look at WrapITK, which is also included in ITK  
>> 3.2.0
>> >
>> >
>> >
>> > On Wed, 14 Mar 2007 20:43:48 +0100, Matei Stroila
>> > <matei.stroila at gmail.com> wrote:
>> >
>> > > I built the new ITK release (3.2.0) with Visual Studio 2005 and no
>> > > errors.
>> > > I set the PYTHONPATH to the CSwig dir:
>> > > D:\build\InsightToolkit-3.2.0-bin\Wrapping\CSwig\Python\Release
>> > > and added to the PATH the build dir:
>> > > D:\build\InsightToolkit-3.2.0-bin\bin\release
>> > >
>> > > When I try to use Python I get the following:
>> > >
>> > >  Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
>> > > (Intel)] on win
>> > > 32
>> > > Type "help", "copyright", "credits" or "license" for more  
>> information.
>> > >>>> from InsightToolkit import *
>> > > Traceback (most recent call last):
>> > >   File "<stdin>", line 1, in <module>
>> > >   File
>> > >  
>> "D:/build/InsightToolkit-3.2.0-bin/Wrapping/CSwig/Python\Release\InsightT
>> > > oolkit.py", line 1, in <module>
>> > >     from itkalgorithms import *
>> > >   File
>> > >  
>> "D:/build/InsightToolkit-3.2.0-bin/Wrapping/CSwig/Python\Release\itkalgor
>> > > ithms.py", line 1, in <module>
>> > >     from itknumerics import *
>> > >   File
>> > >  
>> "D:/build/InsightToolkit-3.2.0-bin/Wrapping/CSwig/Python\Release\itknumer
>> > > ics.py", line 1, in <module>
>> > >     from itkcommon import *
>> > >   File
>> > >  
>> "D:/build/InsightToolkit-3.2.0-bin/Wrapping/CSwig/Python\Release\itkcommo
>> > > n.py", line 1, in <module>
>> > >     from vxlnumerics import *
>> > >   File
>> > >  
>> "D:/build/InsightToolkit-3.2.0-bin/Wrapping/CSwig/Python\Release\vxlnumer
>> > > ics.py", line 4, in <module>
>> > >     from VXLNumericsPython import *
>> > >   File "VXLNumericsPython.py", line 5, in <module>
>> > >     import _VXLNumericsPython
>> > > ImportError: No module named _VXLNumericsPython
>> > >
>> > > I checked the build dir and _VXLNumericsPython.dll is there. I don't
>> > > understand why is not finding that module.
>> > >
>> > > Thanks a lot for help,
>> > >
>> > > Matei
>> > > _______________________________________________
>> > > Insight-users mailing list
>> > > Insight-users at itk.org
>> > > http://www.itk.org/mailman/listinfo/insight-users
>> >
>> >
>> >
>> > --
>> > 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://voxel.jouy.inra.fr
>> >
>>



-- 
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://voxel.jouy.inra.fr


More information about the Insight-users mailing list