[Paraview] basic python paraview setup question
Moreland, Kenneth
kmorel at sandia.gov
Fri Jan 23 11:53:32 EST 2009
Sorry. I was looking at my development build because I don't have the release installed on my system right now. Try removing the final paraview from the lib directory path.
export PYTHONPATH="/home/sree/paraview-3.4.0/lib/paraview-3.4:/home/sree/paraview-3.4.0/bin"
-Ken
On 1/23/09 9:45 AM, "Sreejith Kuttanikkad" <sreejithpk at gmail.com> wrote:
On Fri, Jan 23, 2009 at 5:40 PM, Moreland, Kenneth <kmorel at sandia.gov> wrote:
First, I would like to mention that the ParaView binaries come with a program called pvpython that is basically just a python interpreter with the paths set up.
That said, I understand that it is not always practical to use pvpython in lieu of the default python interpreter, so to actually answer your question, you also have to add this to your PYTHONPATH
/home/sree/paraview-3.4.0/Utilities/VTKPythonWrapping
After that, python should find the paraview module.
Thank you for the quick reply.
But in the paraview-3.4 directory, I do not have a Utilities directory. I only have bin/ and lib/
sree at durga:~/paraview-3.4.0$ ls
bin lib
Although not strictly necessary, I also recommend calling paraview.servermanager.vtkInitializationHelper.Finalize() right before your script exits. This will make sure that all the VTK object get cleaned up nicely and is one of the other things that pvpython will do for you.
-Ken
On 1/23/09 8:59 AM, "Sreejith Kuttanikkad" <sreejithpk at gmail.com <http://sreejithpk@gmail.com> > wrote:
Dear Paraview,
I can't get python scripting working with paraview. I have downloaded paraview binary 3.4.0 for linux and set pythonpath by
export PYTHONPATH="/home/sree/paraview-3.4.0/lib/paraview-3.4/paraview/:/home/sree/paraview-3.4.0/bin/" in .bashrc file
and in python when i printed the paths it showed the paraview paths:
print sys.path
['', '/home/sree/paraview-3.4.0/lib/paraview-3.4/paraview', '/home/sree/paraview-3.4.0/bin'.... ]
however when i followed commands as given in http://www.paraview.org/Wiki/ParaView/Python_Scripting
the following error occured.
>>> from paraview import servermanager
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named paraview
what I am missing here.. ?
thanks,
Sreejith
**** Kenneth Moreland
*** Sandia National Laboratories
***********
*** *** *** email: kmorel at sandia.gov <http://kmorel@sandia.gov>
** *** ** phone: (505) 844-8919
*** web: http://www.cs.unm.edu/~kmorel <http://www.cs.unm.edu/%7Ekmorel>
**** Kenneth Moreland
*** Sandia National Laboratories
***********
*** *** *** email: kmorel at sandia.gov
** *** ** phone: (505) 844-8919
*** web: http://www.cs.unm.edu/~kmorel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090123/8dd59209/attachment.htm>
More information about the ParaView
mailing list