I just realized that paraview is using a different python (2.5) on my system than the default one (2.7) which has numpy. Also, the paraview I got is a compiled binary of 3.14. How do I go about pointing paraview to python2.7.<div>
<br></div><div>Also, form running the saved trace using python, it looks like it cannot load some of the paraview modules even though I can see them in the paraview directory. Any help?</div><div><br></div><div>Regards <br>
<br><div class="gmail_quote">On Fri, Mar 22, 2013 at 12:17 AM, Chukwudi Chukwudozie <span dir="ltr"><<a href="mailto:cchukw1@tigers.lsu.edu" target="_blank">cchukw1@tigers.lsu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Hi,</div><div><br></div><div>So I got python2.7 working and I set all the variables correctly like you advised but I still get errors. When I try to run a saved trace using python, I get the following errors.</div><div>
<br></div><div>b8-8d-12-38-84-40:Python chukwudichukwudozie$ python trace.py </div><div class="im"><div>Traceback (most recent call last):</div></div><div> File "trace.py", line 2, in <module></div><div>
except: from paraview.simple import *</div>
<div> File "/Applications/ParaView.app/Contents/Python/paraview/simple.py", line 39, in <module></div><div> import servermanager</div><div> File "/Applications/ParaView.app/Contents/Python/paraview/servermanager.py", line 43, in <module></div>
<div> import paraview, re, os, os.path, new, sys, vtk</div><div> File "/Applications/ParaView.app/Contents/Python/paraview/vtk/__init__.py", line 1, in <module></div><div> from vtkCommonPython import *</div>
<div>ImportError: dlopen(/Applications/ParaView.app/Contents/Libraries/vtkCommonPython.so, 2): Library not loaded: @executable_path/../Libraries/libvtkCommonPythonD.pv3.14.dylib</div><div> Referenced from: /Applications/ParaView.app/Contents/Libraries/vtkCommonPython.so</div>
<div> Reason: image not found</div><div><br></div><div>Also, when I try to use pvpython to run a simple script to plot graph, I get the error message below</div><div><br></div><div><div>b8-8d-12-38-84-40:Python chukwudichukwudozie$ pvpython plot.py </div>
<div class="im">
<div>Traceback (most recent call last):</div></div><div class="im"><div> File "plot.py", line 2, in <module></div><div> import numpy as np</div><div> File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/__init__.py", line 130, in <module></div>
<div> import add_newdocs</div><div> File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/add_newdocs.py", line 9, in <module></div><div> from lib import add_newdoc</div>
<div> File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/lib/__init__.py", line 152, in <module></div><div> from type_check import *</div><div> File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/lib/type_check.py", line 8, in <module></div>
<div> import numpy.core.numeric as _nx</div><div> File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/core/__init__.py", line 5, in <module></div><div> import multiarray</div>
<div>ImportError: dlopen(/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/core/multiarray.so, 2): no suitable image found. Did find:</div><div><span style="white-space:pre-wrap"> </span>/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/core/multiarray.so: mach-o, but wrong architecture</div>
</div></div><div><br></div><div><br></div><div>Thanks.</div><div><br></div><br><div class="gmail_quote"><div class="im">On Sun, Mar 17, 2013 at 6:43 PM, Pat Marion <span dir="ltr"><<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@kitware.com</a>></span> wrote:<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For PYTHONPATH, try removing the last /paraview components from the path, so you're setting: /Applications/ParaView.app/Contents/Python <br>
<br>Also add /Applications/ParaView.app/Contents/Libraries to PYTHONPATH and DYLD_LIBRARY_PATH. Note, that is DYLD not LD. You don't need to add the Contents/bin directory to DYLD_LIBRARY_PATH, and you don't need to add DYLD_LIBRARY_PATH to PATH, and you don't need to add PYTHONPATH to PATH.<br>
<br><br>In summary, ParaView uses both pure python modules and c extension modules. The pure python modules are in Contents/Python, and the c extension modules are in Contents/Libraries. Both these paths should be on PYTHONPATH (or append sys.path at the top of your main script). The c extenion modules have dependencies on dynamic libraries which are located in Contents/Libraries, so Contents/Libraries this needs to be in the DYLD_LIBRARY_PATH.<br>
<br>Pat<br><br><br><div class="gmail_quote"><div><div>On Sat, Mar 16, 2013 at 12:58 PM, Chukwudi Chukwudozie <span dir="ltr"><<a href="mailto:cchukw1@tigers.lsu.edu" target="_blank">cchukw1@tigers.lsu.edu</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hi, <div><br></div><div>I want help to be able to do the following two things using my mac OS X 10.7.5 but I have not been successful.</div>
<div><br></div><div>1. Run a paraview python script on terminal using pvpython.</div>
<div>2. Run the same script on terminal using python.<br clear="all"><div><br></div><div>For (1) above, I saved the trace for a particular operation and ran it using pvpython and it worked. However, I got a paraview python scripts (newscript.py) on the internet and when I try to run them on my terminal using pvpython, it aborts with the error below.</div>
<div><br></div><div><div>Traceback (most recent call last):</div><div> File "newscript.py", line 3, in <module></div><div> Connect()</div><div> File "/Applications/ParaView.app/Contents/Python/paraview/servermanager.py", line 1932, in Connect</div>
<div> connection = Connection(id, session)</div><div> File "/Applications/ParaView.app/Contents/Python/paraview/servermanager.py", line 1806, in __init__</div><div> raise RuntimeError, "Concurrent connections not supported!"</div>
<div>RuntimeError: Concurrent connections not supported!</div></div><div><br></div><div><br></div><div>For (2) above, I tried to run on my terminal using system python, the saved trace (newparaview.py) that was successful with pvpython and it keeps aborting with the following error messages</div>
<div><br></div><div><div>Traceback (most recent call last):</div><div> File "newparaview.py", line 2, in <module></div><div> from paraview.servermanager import *</div><div>ImportError: No module named paraview.servermanager</div>
</div><div><br></div><div>My .bash_profile file looks like this.</div><div><br></div><div><div>export LD_LIBRARY_PATH=/Applications/ParaView.app/Contents/bin</div><div>export PATH=$PATH:${LD_LIBRARY_PATH}</div><div><br></div>
<div>export PYTHONPATH=$PYTHONPATH:/Applications/ParaView.app/Contents/Python/paraview:/Applications/ParaView.app/Contents/bin</div><div>export PATH=$PATH:{$PYTHONPATH}</div><div><br></div><div># Setting PATH for EPD_free-7.2-2</div>
<div># The orginal version is saved in .bash_profile.pysave</div><div>PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"</div><div>export PATH</div></div><div><br></div><div><br></div><div>
Regards,</div><span><font color="#888888"><div><br></div><div><br></div>-- <br>Chukwudi Chukwudozie <br><a href="mailto:cchukw1@tigers.lsu.edu" target="_blank">cchukw1@tigers.lsu.edu</a><br>Craft and Hawkins Department of Petroleum Engineering<br>
Louisiana State University<br>
Patrick F. Taylor Hall (CEBA)<br>Room 3429<br>Baton Rouge LA, 70803<br>Cell:<a href="tel:3373546822" value="+13373546822" target="_blank">3373546822</a><br>Office: <a href="tel:2255786064" value="+12255786064" target="_blank">2255786064</a>
</font></span></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>
</blockquote></div></div></div><div class="HOEnZb"><div class="h5"><br><br clear="all"><div><br></div>-- <br>Chukwudi Chukwudozie <br><a href="mailto:cchukw1@tigers.lsu.edu" target="_blank">cchukw1@tigers.lsu.edu</a><br>
Craft and Hawkins Department of Petroleum Engineering<br>Louisiana State University<br>
Patrick F. Taylor Hall (CEBA)<br>Room 3429<br>Baton Rouge LA, 70803<br>Cell:<a href="tel:3373546822" value="+13373546822" target="_blank">3373546822</a><br>Office: <a href="tel:2255786064" value="+12255786064" target="_blank">2255786064</a>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Chukwudi Chukwudozie <br><a href="mailto:cchukw1@tigers.lsu.edu">cchukw1@tigers.lsu.edu</a><br>Craft and Hawkins Department of Petroleum Engineering<br>
Louisiana State University<br>Patrick F. Taylor Hall (CEBA)<br>Room 3429<br>Baton Rouge LA, 70803<br>Cell:3373546822<br>Office: 2255786064
</div>