[vtkusers] VTK and Python2.3

Charles Doutriaux doutriaux1 at llnl.gov
Thu Oct 30 20:19:59 EST 2003


Hi All,

I'm new to the list but have been looking at VTK for a while. I'm 
representing a group developping Climate Data Analysis Tools ( 
http://cdat.sf.net ), a big portion of it consists in Data Representation.

We've had some really interesting early success with VTK.

Unfortunately we're now running into a wall with Python2.3
We actually have 3 different (somewhat related) problems with the VTK 
install.

Please excuse the length of this email !

-----------------------------------------------------------
Problem 1: Using the latest stable VTK4.2.3
-----------------------------------------------------------
If I build it against Python2.2, everything if fine
If I build it against python 2.3, havoc arises!
Most of the examples now complain that they need vtk object passed to them.
I'm guessing the object representation changed into python2.3 and now 
the vtk tests won't recognized it anymore !

Here is a log of examples and the exact error messages

roseland /work/Me/exsrc/build/VTK/Examples/VolumeRendering/Python >python
PseudoVolumeRendering.py
Traceback (most recent call last):
   File "PseudoVolumeRendering.py", line 37, in ?
     cutter.SetCutFunction(plane)
ValueError: method requires a VTK object
 

roseland
  /work/Me/exsrc/build/VTK/Examples/VisualizationAlgorithms/Python
 >python BandContourTerrain.py
Traceback (most recent call last):
   File "BandContourTerrain.py", line 73, in ?
     demMapper.SetLookupTable(lutLand)
ValueError: method requires a VTK object
 

roseland /work/Me/exsrc/build/VTK/Examples/VisualizationAlgorithms/Python
 >python ClipCow.py
Traceback (most recent call last):
   File "ClipCow.py", line 31, in ?
     clipper.SetClipFunction(plane)
ValueError: method requires a VTK object
 

roseland /work/Me/exsrc/build/VTK/Examples/VisualizationAlgorithms/Python
 >python ColorIsosurface.py
works
 

roseland /work/Me/exsrc/build/VTK/Examples/VisualizationAlgorithms/Python
 >python CutCombustor.py
Traceback (most recent call last):
   File "CutCombustor.py", line 26, in ?
     planeCut.SetCutFunction(plane)
ValueError: method requires a VTK object
 

roseland /work/Me/exsrc/build/VTK/Examples/VisualizationAlgorithms/Python
 >python deciFran.py
works
 

roseland /work/Me/exsrc/build/VTK/Examples/VisualizationAlgorithms/Python
 >python DepthSort.py
Traceback (most recent call last):
   File "DepthSort.py", line 61, in ?
     mapper.SetScalarRange(0, depthSort.GetOutput().GetNumberOfCells())
AttributeError: GetNumberOfCells
 

roseland /work/Me/exsrc/build/VTK/Examples/VisualizationAlgorithms/Python
 >python ExtractGeometry.py
Traceback (most recent call last):
   File "ExtractGeometry.py", line 15, in ?
     sample.SetImplicitFunction(quadric)
ValueError: method requires a VTK object
 

roseland /work/Me/exsrc/build/VTK/Examples/VisualizationAlgorithms/Python
 >python ExtractUGrid.py
Traceback (most recent call last):
   File "ExtractUGrid.py", line 67, in ?
     parisonMapper.SetLookupTable(lut)
ValueError: method requires a VTK object

-----------------------------------------------------------
Problem 2: Using the VTK CVS (Oct 30) and Python2.3
-----------------------------------------------------------
The import fails !
reload will go further and eventually work
but REALLY it doesn't, VTK keeps failing
log:
roseland ~ >python
Python 2.3 (#1, Oct 13 2003, 14:10:46)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import vtk
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File
"/roseland0/cdat/latest/lib/python2.3/site-packages/vtk_python/vtk/__init__.py",
line 7, in ?
     from common import *
   File
"/roseland0/cdat/latest/lib/python2.3/site-packages/vtk_python/vtk/common.py",
line 7, in ?
     from libvtkCommonPython import *
ImportError:
/roseland0/cdat/latest/lib/python2.3/site-packages/vtk_python/libvtkCommonPython.so:
undefined symbol: _ZN11vtkPolyData10BuildLinksEv
 >>> import vtk
 >>> reload(vtk)
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File
"/roseland0/cdat/latest/lib/python2.3/site-packages/vtk_python/vtk/__init__.py",
line 9, in ?
     from io import *
   File
"/roseland0/cdat/latest/lib/python2.3/site-packages/vtk_python/vtk/io.py",
line 7, in ?
     from libvtkIOPython import *
ImportError:
/roseland0/cdat/latest/lib/python2.3/site-packages/vtk_python/libvtkIOPython.so:
undefined symbol: _ZN20vtkXMLPDataSetWriter5WriteEv
 >>> reload(vtk)
<module 'vtk' from
'/roseland0/cdat/latest/lib/python2.3/site-packages/vtk_python/vtk/__init__.pyc'>


-----------------------------------------------------------
Problem 3: Using the VTK CVS (Oct 30th, 2003)
Hybrid Package won't build !
-----------------------------------------------------------
It was working with the CVS repository of Oct 27th, 2003
Here's the error I get at compilation time:
Building shared library /roseland0/cdat/latest/VTK/bin/libvtkHybridTCL.so...
/roseland0/cdat/latest/VTK/Patented: building default_target
Building dependencies. cmake.depends...
Makefile:239: warning: NUL character seen; rest of line ignored
Makefile:239: warning: NUL character seen; rest of line ignored
Makefile:239: warning: NUL character seen; rest of line ignored
Building Custom command 
/roseland0/cdat/latest/VTK/Patented/vtkSynchronizedTemplates3DTcl.cxx...
    Parsed func New
    Parsed func PrintSelf
    Parsed func SetInput
    Parsed func GetInput
    Parsed func GetMTime
    Parsed func SetValue
    Parsed func GetValue
    Parsed func GetValues
    Parsed func GetValues
    Parsed func SetNumberOfContours
    Parsed func GetNumberOfContours
    Parsed func GenerateValues
    Parsed func GenerateValues
    Parsed func GetExecuteExtent
    Parsed func ThreadedExecute
    Parsed func SetInputMemoryLimit
    Parsed func GetInputMemoryLimit
    Parsed func SelectInputScalars
    Parsed func vtkSynchronizedTemplates3D
    Parsed func vtkSynchronizedTemplates3D
    Parsed func Execute
    Parsed func ExecuteInformation
    Parsed func ComputeInputUpdateExtents
    Parsed func vtkSynchronizedTemplates3D
    Converted operator
make[3]: *** No rule to make target 
`/roseland0/cdat/latest/VTK/Patented/vtkDecimateTcl.cxx', needed by 
`cmake.check_depends'.  Stop.
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Patented] Error 2
make: *** [default_target] Error 2


Thanks for any help

C.





More information about the vtkusers mailing list