[Paraview] importing paraview.simple in python on mac

Luc Berger-Vergiat lb2653 at columbia.edu
Mon Apr 7 20:28:15 EDT 2014


Hi,
I am having difficulties to load paraview.simple in python 2.7 on my mac.
I installed the latest paraview app which is paraview.4.1.0

Here is what I do in my terminal:

Luc$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from paraview.simple import *
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

here are my PYTHONPATH and DYLD_LIBRARY_PATH variables.

PYTHONPATH="/Applications/paraview.app/Contents/Python:/Applications/paraview.app/Contents/Libraries:/Users/Luc/FEAP/ShearBands/prepost_tools:${PYTHONPATH}"
export PYTHONPATH
DYLD_LIBRARY_PATH="/Applications/paraview.app/Contents/bin:/Applications/paraview.app/Contents/Python:/Applications/paraview.app/Contents/Libraries:${DYLD_LIBRARY_PATH}"
export DYLD_LIBRARY_PATH

My suspicion is that @executable_path/../Libraries/libvtkCommonCorePython26D-pv4.1.1.dylib is not correct for some reason. Maybe @executable_path/../ is not interpreted correctly by my system?
How can I fix this issue?

Best,
Luc




More information about the ParaView mailing list