<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. &nbsp;I was looking at my development build because I don&#8217;t have the release installed on my system right now. &nbsp;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=&quot;/home/sree/paraview-3.4.0/lib/paraview-3.4:/home/sree/paraview-3.4.0/bin&quot;<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, &quot;Sreejith Kuttanikkad&quot; &lt;<a href="sreejithpk@gmail.com">sreejithpk@gmail.com</a>&gt; 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 &lt;<a href="kmorel@sandia.gov">kmorel@sandia.gov</a>&gt; 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 &nbsp;bin/ &nbsp;and lib/<BR>
<a href="sree@durga:~/paraview-3.4.0$">sree@durga:~/paraview-3.4.0$</a> ls<BR>
bin &nbsp;lib<BR>
&nbsp;<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. &nbsp;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, &quot;Sreejith Kuttanikkad&quot; &lt;<a href="sreejithpk@gmail.com">sreejithpk@gmail.com</a> &lt;<a href="http://sreejithpk@gmail.com">http://sreejithpk@gmail.com</a>&gt; &gt; 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=&quot;/home/sree/paraview-3.4.0/lib/paraview-3.4/paraview/:/home/sree/paraview-3.4.0/bin/&quot; &nbsp;&nbsp;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>
&gt;&gt;&gt; from paraview import servermanager<BR>
Traceback (most recent call last):<BR>
&nbsp;&nbsp;File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<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>
&nbsp;&nbsp;&nbsp;**** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kenneth Moreland<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sandia National Laboratories<BR>
*********** &nbsp;<BR>
*** *** *** &nbsp;email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a> &lt;<a href="http://kmorel@sandia.gov">http://kmorel@sandia.gov</a>&gt; <BR>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web: &nbsp;&nbsp;<a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a> &lt;<a href="http://www.cs.unm.edu/%7Ekmorel">http://www.cs.unm.edu/%7Ekmorel</a>&gt; <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>
&nbsp;&nbsp;&nbsp;**** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kenneth Moreland<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sandia National Laboratories<BR>
*********** &nbsp;<BR>
*** *** *** &nbsp;email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web: &nbsp;&nbsp;<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>