[Paraview] newbie question -- cannot run simple example

Newsboost Guy newsboost at gmail.com
Sat Apr 28 22:16:38 EDT 2012


Hi,

This, I think should work:

------------------
from paraview.simple import *

# Create a view
view = CreateRenderView()

# Initialize a new interactor
from vtk.libvtkRenderingPython import *
iren = vtkRenderWindowInteractor()
iren.SetInteractorStyle(vtkInteractorStyleTrackball())
iren.SetRenderWindow(view.GetRenderWindow())
iren.Initialize()

# Build pipeline
Sphere()
Show()
Render()

# Start interaction
iren.Start()
----------------

I'm using the latest ubuntu 12.04 so I suspect maybe this isnt too
good... Anyway, when I run the code I get:

-----
$ python test.py
Traceback (most recent call last):
   File "test.py", line 7, in <module>
     from vtk.libvtkRenderingPython import *
ImportError: No module named libvtkRenderingPython
-----

I then read that maybe I should better use "pvpython", this gives:

--
$ pvpython test.py
Error converting executable file "/usr/bin/../lib/paraview/pvpython" to
real path: No such file or directory
--


Sorry, I don't have much experience with this. It's a noob question, I
know. I hope somebody knows the answer/solution. Thank you very much -
I've been struggling with this (and making simple paraview python
scripts) for about 10 hours. No I have to ask you guys...


More information about the ParaView mailing list