[vtkusers] Problems with vtkpython

Corinne Bachmann corinne at sed.ethz.ch
Wed Dec 12 11:18:16 EST 2007


hi

thank you for your tip

sys.path gives me:
['', '/usr/lib/python25.zip', '/usr/lib/python2.5',
'/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/Numeric',
'/usr/lib/python2.5/site-packages/PIL',
'/usr/lib/python2.5/site-packages/gtk-2.0',
'/usr/local/lib/python2.5/site-packages']

and libVTKCommonPython.so is
in /usr/local/lib/python2.5/site-packages/vtk, so it should be included,
but importing it results in an error.


oh, and I forgot to mention before, I am using vtk 5.0.3, python 2.5.1
on Suse 10.3.

-Corinne


On Wed, 2007-12-12 at 10:09 -0600, Alethea Bair wrote:
> One thing I have found helpful is the sys.path in python
> 
> import sys
> sys.path
> 
> And look at this string to see if the modules you want to load are in any
> of these directories. If they are not then you should edit the PYTHONPATH
> environment variable to include whatever path the files are actually in
> 
> hope that helps
> Alethea
> 
> 
> > Dear all
> >
> > I installed vtk and enabled VTK_WRAP_PYTHON to be able to write vtk
> > codes in python. Ccmake and make install resulted in no error messages,
> > when I first tried to run vtkpython it resulted in:
> > vtkpython: error while loading shared libraries: libvtksys.so.5.0:
> > cannot open shared object file: No such file or directory
> >
> > but I managed to fix that with the help of the mailing list archive.
> > When I use vtkpython now it starts up as a normal python enviroment, but
> > none of the vtkmodules seem to work. I was trying an example from this
> > website: http://www.imaging.robarts.ca/~dgobbi/vtk/vtkpython.html but
> > already the first line results in an error:
> > from libVTKCommonPython import *
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > ImportError: No module named libVTKCommonPython
> >
> > I thought then I don't have to import the modules as I am already using
> > vtkpython and not python, but skipping the import steps just resulted
> > in:
> > ren = vtkRenderer()
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > NameError: name 'vtkRenderer' is not defined
> >
> > So it seems that I forgot some links to the vtk somewhere, but I don't
> > know where. Any help would be very much appreciated.
> >
> > Cheerz,
> > Corinne
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> 
> 




More information about the vtkusers mailing list