[Insight-users] problem to wrap Itk with python

Luis Ibanez luis.ibanez@kitware.com
Wed May 12 22:26:11 EDT 2004


Hi Nick,

What method are you using for setting
the PYTHONPATH environment variable ?

What operating system are you running ?

What Python version are you using ?

--

The file

      VXLNumericsPython.py

should be located on:

         ITK_BIN/bin/release

or

         ITK_BIN/bin/debug

depending on the compilation mode that
you used, and where ITK_BIN is the
binary directory where you built ITK.

Did you build for Release ? or did you build
for Debug ?

---

Are you moving the files after building them  ?
You *should not* move the files after completing
the build process.


---

Just for the record:

We build nightly ITK with Python wrapping under
Visual Studio 7 2003. You will find this built at
"terminus.kitware". There are 8 python test run
nightly.



   Regards,


    Luis



-----------------
Nick Hu wrote:

> Luis, Actually I read it and I did it.
> 
> I already set the environment variable PYTHONPATH to the location, so it
> could load some modules like itkbase.py, itkAlogorithm.py ... but the error
> indicated that "VXLNumericsPython"  could not be found (it does not exist).
> 
> The other thing I actually found in the  "Insight/Wrapping/CSwig/README" is
> although you could copy Cswig to ../Utilities/ as part of itk, you can't
> just start building itk --it will complain that some cmake file can't be
> found. You will have to run cmake to configure Cswig and build it first and
> then start building itk.
> 
> By the way I use visual studio 7 .net 2003.
> Any advice?
> Thanks a lot.
> 
> nick
> ----- Original Message ----- 
> From: "Luis Ibanez" <luis.ibanez@kitware.com>
> To: "Nick Hu" <nhu@sten.sunnybrook.utoronto.ca>
> Cc: <insight-users@itk.org>
> Sent: Wednesday, May 12, 2004 4:26 PM
> Subject: Re: [Insight-users] problem to wrap Itk with python
> 
> 
> 
>>Hi Nick,
>>
>>
>>Please read the README file in
>>
>>      Insight/Wrapping/CSwig/README
>>
>>
>>It seems that you are simply missing to
>>set up the evironment variable PYTHONPATH
>>
>>--
>>
>>First set the PYTHONPATH variable to
>>
>>    ITK-build/Wrapping/CSwig/Python/[Release].
>>
>>Then run python and run this python command:
>>
>>     from InsightToolkit import *
>>
>>
>>
>>Regards,
>>
>>
>>     Luis
>>
>>
>>------------------
>>Nick Hu wrote:
>>
>>
>>>Hi all,
>>>I was trying to build itk with python wrapper but got an error when I
> 
> loaded
> 
>>>"InsightToolkit.py" or ran the examples in the
>>>"..\Wrapping\CSwig\Tests\Python":
>>>
>>>
>>>Traceback (most recent call last):
>>>  File
>>>
> 
> "C:\Project\itk\nightly\Insight\Wrapping\CSwig\Tests\Python\testObject.py
> 
>>>", line 1, in ?
>>>    from InsightToolkit import *
>>>  File
>>>
> 
> "C:\Project\itk\nightly\Insight\Wrapping\CSwig\Python\InsightToolkit.py",
> 
>>> line 1, in ?
>>>    from itkalgorithms import *
>>>  File
>>>"C:\Project\itk\nightly\Insight\Wrapping\CSwig\Python\itkalgorithms.py",
>>>line 1, in ?
>>>    from itkbasicfilters import *
>>>  File
>>>
> 
> "C:\Project\itk\nightly\Insight\Wrapping\CSwig\Python\itkbasicfilters.py"
> 
>>>, line 1, in ?
>>>    from itkcommon import *
>>>  File
> 
> "C:\Project\itk\nightly\Insight\Wrapping\CSwig\Python\itkcommon.py",
> 
>>>line
>>> 1, in ?
>>>    from vxlnumerics import *
>>>  File
>>>"C:\Project\itk\nightly\Insight\Wrapping\CSwig\Python\vxlnumerics.py",
> 
> li
> 
>>>ne 4, in ?
>>>    from VXLNumericsPython import *
>>>ImportError: No module named VXLNumericsPython
>>>
>>>It seems that VXLNumericsPython could not be found. I searched all files
> 
> on
> 
>>>my computer and could find " VXLNumericsPython.py" or
>>>"VXLNumericsPython.dll".
>>>
>>>The building process has no problem at all. First I built itk without
> 
> Cswig
> 
>>>wrapping, then I built Cswig, finally I re-ran the cmake to set for
> 
> Cswig
> 
>>>wrapping with python.
>>>
>>>Can any one please give me a suggestion? Thanks
>>>
>>>
>>>Regards,
>>>
>>>nick
>>>
>>>
>>>
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users@itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>>
> 
> 






More information about the Insight-users mailing list