[Paraview] importing paraview.simple in python on mac

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Apr 16 08:20:34 EDT 2014


If you want to use Python27, download the
"ParaView-4.1.0-Darwin-64bit-Lion-Python27.dmg" binary. You're using
the one built forPython 2.6.

Attached is a script I use to run ParaView with Python 2.6. Simply
update the script to point to directories on your machine and then run
"python2.7" instead of python2.6". Hope that helps.

On Mon, Apr 7, 2014 at 8:28 PM, Luc Berger-Vergiat <lb2653 at columbia.edu> wrote:
>
> 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
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
-------------- next part --------------
A non-text attachment was scrubbed...
Name: runPython26.sh
Type: application/x-sh
Size: 645 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140416/4c763643/attachment.sh>


More information about the ParaView mailing list