VTK 4.2.6 + Python 2.3.4 and VTK Examples problem

R

Ron Kneusel

I have installed VTK 4.2.6 and Python 2.3.4. Both are working and I
can run the VTK Python examples except for those in the GUI directory.
These always fail with messages similar to this:

/home/rkneusel/VTK/Examples/GUI/Python> python2.3 BoxWidget.py
Traceback (most recent call last):
File "BoxWidget.py", line 57, in ?
boxWidget = vtk.vtkBoxWidget()
AttributeError: 'module' object has no attribute 'vtkBoxWidget'

This method of running the other VTK examples, including those that
put up a window (like the medical examples) work properly.

I read a blurb in the MayaVi installation notes that this is due to a
problem with a return value but should not exist in versions of VTK
4.2.5 or higher.

Any help appreciated!

Ron
 
C

Charl P. Botha

I have installed VTK 4.2.6 and Python 2.3.4. Both are working and I
can run the VTK Python examples except for those in the GUI directory.
These always fail with messages similar to this:

/home/rkneusel/VTK/Examples/GUI/Python> python2.3 BoxWidget.py
Traceback (most recent call last):
File "BoxWidget.py", line 57, in ?
boxWidget = vtk.vtkBoxWidget()
AttributeError: 'module' object has no attribute 'vtkBoxWidget'

You forgot to build the Hybrid packages, i.e. VTK_USE_HYBRID should be set
to ON during your cmake configuration. Many of the classes used in the GUI
examples are part of the Hybrid code.

By the way, it's probably a better idea to post VTK Python problems on the
VTK list.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top