[Insight-users] problem to wrap Itk with python

Luis Ibanez luis.ibanez@kitware.com
Thu May 13 00:03:10 EDT 2004


Hi Nick,


Did you got *any* error messages during the build ?

--

Please go to the directory:

   ITK_BIN/Wrapping/CSwig/VXLNumerics

find the file

     _VXLNumericsPython.vcproj

and send it to us in an attachemt.

This is a text file. you can actually open it
with any text editor and look for the rule for
building


        _VXLNumericsPython.dll



Regards,


    Luis




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

> Luis, see the answers below please:
> 
> 
>>What method are you using for setting
>>the PYTHONPATH environment variable ?
> 
> 
>>From "Start" menu on the desktop->"Setting"->"Control
> panel"->"system"-"advanced" tab->"environment Varaibles"-> "Edit" PYTHONPATH
> 
> 
>>What operating system are you running ?
> 
> Windows 2000
> 
> 
>>What Python version are you using ?
> 
> python 2.3
> 
> 
> 
>>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.
> 
> 
> I can't find the file in the directory and no py file in the directory.
> 
> 
>>Did you build for Release ? or did you build
>>for Debug ?
> 
> 
> Release
> 
>>Are you moving the files after building them  ?
>>You *should not* move the files after completing
>>the build process.
> 
> 
> No I didn't move files
> 
> 
>>---
>>
>>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.
>>
> 
> I have the same problem with release 1.6 and nightly version. The file
> "VXLNumericsPython.py" just does not exist on my machine :(
> 
> Regards,
> 
> nick
> 
> 
> 
> 
> 
> 
> 
> 
>>-----------------
>>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