[Paraview] importing paraview.simple in python on mac

Luc Berger-Vergiat lb2653 at columbia.edu
Wed Apr 16 10:04:35 EDT 2014


Thanks, this works fine.
I have been looking forward to using paraview.simple in the regular python prompt.
pvpython is nice but the prompt does not provide all the features of the full prompt from python so this is a big improvement for me!

Best,
Luc

On 16 avr. 2014, at 08:22, Utkarsh Ayachit wrote:

> Including the script inline this time:
> 
> ----------------------------------------------------------------
> # Path to look for missing *.dyld files under.
> export DYLD_FALLBACK_LIBRARY_PATH="/Users/utkarsh/Desktop/paraview4.1.0.app/Contents/Libraries"
> 
> # Path to look for missing *.so files under.
> export LD_LIBRARY_PATH="/Users/utkarsh/Desktop/paraview4.1.0.app/Contents/Libraries"
> 
> # Path to look for missing frameworks under.
> export DYLD_FALLBACK_FRAMEWORK_PATH="/Users/utkarsh/Desktop/paraview4.1.0.app/Contents/Frameworks"
> 
> # Path where Python should find Python Modules and Packages.
> export PYTHONPATH=/Users/utkarsh/Desktop/paraview4.1.0.app/Contents/Python:/Users/utkarsh/Desktop/paraview4.1.0.app/Contents/Libraries
> 
> # Now run Python.
> python2.6
> ---------------------------------------------------------------------------
> 
> On Wed, Apr 16, 2014 at 8:20 AM, Utkarsh Ayachit
> <utkarsh.ayachit at kitware.com> wrote:
>> 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 --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140416/a82d8ef7/attachment-0001.html>


More information about the ParaView mailing list