[Paraview] ParaView python in a generic python
Scott, W Alan
wascott at sandia.gov
Mon Feb 3 15:20:27 EST 2014
I have two users that wants to use ParaView paraview.simple commands from a generic version of Python (i.e., not pvpython). Are there any tricks to getting this to work? One user is on a Mac, the other is on Linux. As you can see, my user is having issues even importing paraview.simple.
Here is a copy of the errors the user is having:
>import sys
>sys.path
['/Applications/paraview.app/Contents/Python', '/Applications/paraview.app/Contents/Libraries', '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip', '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6', '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload', '/Library/Python/2.6/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC']
>From looking at this, I added '/Applications/paraview.app/Contents/Python' and '/Applications/paraview.app/Contents/Libraries' to my PYTHONPATH. I also made a guess at which directory to add to my LD_LIBRARY_PATH. Unfortunately, it did not work, as you can see below:
$ echo $PYTHONPATH
:/Applications/paraview.app/Contents/Libraries/:/Applications/paraview.app/Contents/Python
$ echo $LD_LIBRARY_PATH :/Applications/paraview.app/Contents/Libraries/:/Applications/paraview.app/Contents/Python/vtk
$ python
>>> import paraview.simple
Error: Could not import vtkCommonComputationalGeometryPython
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Applications/paraview.app/Contents/Python/paraview/simple.py", line 41, in <module>
import servermanager
File "/Applications/paraview.app/Contents/Python/paraview/servermanager.py", line 48, in <module>
import paraview, re, os, os.path, new, sys, atexit, vtk
File "/Applications/paraview.app/Contents/Python/paraview/vtk/__init__.py", line 7, in <module>
from vtkCommonCorePython import *
ImportError: dlopen(/Applications/paraview.app/Contents/Libraries/vtkCommonCorePython.so, 2): Library not loaded: @executable_path/../Libraries/libvtkCommonCorePython26D-pv4.1.1.dylib
Referenced from: /Applications/paraview.app/Contents/Libraries/vtkCommonCorePython.so
Reason: image not found
>>>
Thanks,
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140203/35d6584c/attachment.html>
More information about the ParaView
mailing list