<HTML>
<HEAD>
<TITLE>Re: [Paraview] basic python paraview setup question</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>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 </SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>paraview</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> from the lib directory path.<BR>
<BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>export PYTHONPATH="/home/sree/paraview-3.4.0/lib/paraview-3.4:/home/sree/paraview-3.4.0/bin"<BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
-Ken<BR>
<BR>
<BR>
On 1/23/09 9:45 AM, "Sreejith Kuttanikkad" <<a href="sreejithpk@gmail.com">sreejithpk@gmail.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>On Fri, Jan 23, 2009 at 5:40 PM, Moreland, Kenneth <<a href="kmorel@sandia.gov">kmorel@sandia.gov</a>> wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>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.<BR>
<BR>
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<BR>
<BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>/home/sree/paraview-3.4.0/Utilities/VTKPythonWrapping<BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
After that, python should find the paraview module.<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
Thank you for the quick reply. <BR>
But in the paraview-3.4 directory, I do not have a Utilities directory. I only have bin/ and lib/<BR>
<a href="sree@durga:~/paraview-3.4.0$">sree@durga:~/paraview-3.4.0$</a> ls<BR>
bin lib<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
Although not strictly necessary, I also recommend calling </SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>paraview.servermanager.vtkInitializationHelper.Finalize()</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> 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.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
<BR>
On 1/23/09 8:59 AM, "Sreejith Kuttanikkad" <<a href="sreejithpk@gmail.com">sreejithpk@gmail.com</a> <<a href="http://sreejithpk@gmail.com">http://sreejithpk@gmail.com</a>> > wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Dear Paraview,<BR>
<BR>
I can't get python scripting working with paraview. I have downloaded paraview binary 3.4.0 for linux and set pythonpath by<BR>
<BR>
export PYTHONPATH="/home/sree/paraview-3.4.0/lib/paraview-3.4/paraview/:/home/sree/paraview-3.4.0/bin/" in .bashrc file <BR>
<BR>
and in python when i printed the paths it showed the paraview paths:<BR>
<BR>
print sys.path <BR>
['', '/home/sree/paraview-3.4.0/lib/paraview-3.4/paraview', '/home/sree/paraview-3.4.0/bin'.... ]<BR>
<BR>
however when i followed commands as given in <a href="http://www.paraview.org/Wiki/ParaView/Python_Scripting">http://www.paraview.org/Wiki/ParaView/Python_Scripting</a><BR>
the following error occured.<BR>
>>> from paraview import servermanager<BR>
Traceback (most recent call last):<BR>
File "<stdin>", line 1, in <module><BR>
ImportError: No module named paraview<BR>
<BR>
what I am missing here.. ? <BR>
<BR>
thanks,<BR>
Sreejith<BR>
<BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
*********** <BR>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a> <<a href="http://kmorel@sandia.gov">http://kmorel@sandia.gov</a>> <BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a> <<a href="http://www.cs.unm.edu/%7Ekmorel">http://www.cs.unm.edu/%7Ekmorel</a>> <BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
*********** <BR>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>