<div dir="ltr">Hello all,<div><br></div><div>I've encountered a minor, but annoying issue (for me, at least) when using Python in Paraview (installed from binaries on Windows). I noticed that since version 5.2, the Paraview-related paths are appended to the end of the system PYTHONPATH variable, instead of inserted at the beginning. For instance:</div><div><br></div><div><br></div><div><u>v5.1.2</u></div><div><br></div><div><p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,0,0)">>>> import sys</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,0,0)">>>> for p in sys.path:</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,0,0)">... print p</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,0,0)">... </span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\lib\paraview-5.1\site-packages\vtk</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\lib\paraview-5.1\site-packages </span><span style="font-family:Courier;font-size:7.5pt"><font color="#ff0000"><- Paraview VTK code</font></span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\lib\paraview-5.1</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\bin</span></p><p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">...</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Anaconda2\Lib\site-packages </span><span style="font-family:Courier;font-size:7.5pt"><font color="#ff0000"><- original system PYTHONPATH paths</font></span></p>
<p style="margin:0px"><span style="color:rgb(0,150,0);font-family:Courier;font-size:10px">etc</span><font color="#009600" face="Courier"><span style="font-size:10px">...</span></font></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\bin\python27.zip</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\bin\DLLs</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\bin\lib</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\bin\lib\plat-win</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\bin\lib\lib-tk</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\bin</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.5pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.1.2\bin\lib\site-packages</span></p></div><div><br></div><div><br></div><div><u>v5.4.0-RC2:</u></div><div><br></div><div><p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,0,0)">>>> import sys</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,0,0)">>>> for p in sys.path:</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,0,0)">... print p</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,0,0)">... </span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.4.0-RC2-Qt5-OpenGL2-Windows-64bit\bin</span></p><p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">...</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Anaconda2\Lib\site-packages </span><span style="color:rgb(255,0,0);font-family:Courier;font-size:10px"><- original system PYTHONPATH paths</span></p>
<p style="margin:0px"><span style="color:rgb(0,150,0);font-family:Courier;font-size:10px">etc</span><font color="#009600" face="Courier"><span style="font-size:10.4px">...</span></font></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.4.0-RC2-Qt5-OpenGL2-Windows-64bit\bin\python27.zip</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.4.0-RC2-Qt5-OpenGL2-Windows-64bit\bin\DLLs</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.4.0-RC2-Qt5-OpenGL2-Windows-64bit\bin\lib</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.4.0-RC2-Qt5-OpenGL2-Windows-64bit\bin\lib\plat-win</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.4.0-RC2-Qt5-OpenGL2-Windows-64bit\bin\lib\lib-tk</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.4.0-RC2-Qt5-OpenGL2-Windows-64bit\bin</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.4.0-RC2-Qt5-OpenGL2-Windows-64bit\bin\lib\site-packages </span><span style="color:rgb(255,0,0);font-family:Courier;font-size:10px"><- Paraview VTK code</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.4.0-RC2-Qt5-OpenGL2-Windows-64bit\bin\lib\site-packages\win32</span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:7.8pt;color:rgb(0,150,0)">D:\Program Files\ParaView 5.4.0-RC2-Qt5-OpenGL2-Windows-64bit\bin\lib\site-packages\win32\lib</span></p></div><div><br></div><div><br></div><div>This is a problem for me because I like to use the Python Programmable Filter a lot, but now whenever I import VTK, it will first look for the version of VTK on my system, rather than the one used by Paraview, which leads to conflict errors.</div><div><br></div><div>I know this can be fixed by running the Python Shell and manipulating the PYTHONPATH variable from there, but I'd have to do that every time I open Paraview, which is pretty cumbersome. Is there a way to change this behavior? Could it be a changed back in future versions or was there a reason for this change?</div><div><br></div><div>Thanks,</div><div>Evan Kao</div><div><br></div></div>