[Paraview] Python view

Adam Lyon lyon at fnal.gov
Tue Apr 14 20:19:36 EDT 2015


Hi Cory - I tried your little script and got an interesting response...

/Applications/paraview4.3.1.app/Contents/Python/matplotlib/__init__.pyc
/Applications/paraview4.3.1.app/Contents/Python/matplotlib/backends/__init__.pyc
Traceback (most recent call last):
  File "<string>", line 7, in <module>
  File
"/Applications/paraview4.3.1.app/Contents/Python/matplotlib/backends/backend_agg.py",
line 38, in <module>
    from _backend_agg import RendererAgg as _RendererAgg
ImportError:
dlopen(/Applications/paraview4.3.1.app/Contents/Python/matplotlib/backends/_backend_agg.so,
2): Library not loaded:
/Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release-Python27/install/lib/libfreetype.6.dylib
  Referenced from:
/Applications/paraview4.3.1.app/Contents/Python/matplotlib/backends/_backend_agg.so
  Reason: image not found

These files exist,
/Applications/paraview4.3.1.app/Contents/Python/matplotlib/backends/_backend_agg.so
/Applications/paraview4.3.1.app/Contents/Python/matplotlib/backends/backend_agg.py
/Applications/paraview4.3.1.app/Contents/Python/matplotlib/backends/backend_agg.pyc


Interestingly, these files exist, but don't seem to be used...
/Applications/paraview4.3.1.app/Contents/Libraries/libfreetype.6.dylib
/Applications/paraview4.3.1.app/Contents/Libraries/libfreetype.dylib

If I run pvpython I see the same errors.

BUT --- If I do,
export
DYLD_FALLBACK_LIBRARY_PATH=/Applications/paraview4.3.1.app/Contents/Libraries/

and then start Paraview from the command line,

/Applications/paraview4.3.1.app/Contents/MacOS/paraview

... and load the state file and the bluntfin.vts file ... Now I can see the
matplotlib plots!!!!!!

So it looks to me like you aren't setting a dynamic library path correctly
within Paraview's python.

Hope this helps. Thanks for the simple thing to try.

-- Adam


*------*

*Adam L. Lyon*
*Scientist; Associate Division Head for Systems for Scientific Applications*

Scientific Computing Division & Muon g-2 Experiment
Fermi National Accelerator Laboratory
630 840 5522 office
www.fnal.gov
lyon at fnal.gov

Connect with us!
Newsletter <http://www.fnal.gov/pub/today/>  |  Facebook
<https://www.facebook.com/Fermilab>  |  Twitter
<https://twitter.com/Fermilab>

On Tue, Apr 14, 2015 at 6:12 PM, Cory Quammen <cory.quammen at kitware.com>
wrote:

>  Hi Adam,
>
>  I am running the exact same version of ParaView (my About box has the
> same contents as yours), so this is a little bit puzzling.
>
>  Could you try two things:
>
>  1). Run ParaView, create a Python View, then enter this script:
>
>  import matplotlib
>
> print matplotlib.__file__
>
>
>  import matplotlib.backends
>
> print matplotlib.backends.__file__
>
>
>  import matplotlib.backends.backend_agg
>
> print matplotlib.backends.backend_agg.__file__
>
>
>  Please report what the Output Messages window says.
>
>
>  2). Open the contents of your ParaView Mac bundle (right-click, "Show
> Package Contents"), open up Contents -> Python -> matplotlib -> backends.
> Please let me know if you see a backend_agg.py file in there.
>
>
>  Thanks,
>
> Cory
>
> On Tue, Apr 14, 2015 at 4:12 PM, Adam Lyon <lyon at fnal.gov> wrote:
>
>> Hi Cory and Utkarsh - So I never see a plot - just a black window. The
>> error message I sent earlier repeats every time I move my mouse over the
>> python view window.  I'm using Paraview 4.3.1 downloaded from
>> paraview.org. Paraview's "about" box is below.
>>
>>  Do you have a simple matplotlib plot I can try? Thanks! -- Adam
>>
>>
>>  [image: Inline image 1]
>>
>>       *------*
>>
>>  *Adam L. Lyon*
>> *Scientist; Associate Division Head for Systems for Scientific
>> Applications*
>>
>>  Scientific Computing Division & Muon g-2 Experiment
>> Fermi National Accelerator Laboratory
>>  630 840 5522 office
>> www.fnal.gov
>> lyon at fnal.gov
>>
>>  Connect with us!
>> Newsletter <http://www.fnal.gov/pub/today/>  |  Facebook
>> <https://www.facebook.com/Fermilab>  |  Twitter
>> <https://twitter.com/Fermilab>
>>
>> On Tue, Apr 14, 2015 at 2:06 PM, Cory Quammen <cory.quammen at kitware.com>
>> wrote:
>>
>>>  Hi Adam,
>>>
>>>  I am trying to reproduce this with ParaView 4.3.1 64-bit on a Mac with
>>> Yosemite 10.10.2, but haven't been able to. This is the latest Mac binary
>>> available for download on paraview.org. The matplotlib pot shows up as
>>> in the blog post. Is your ParaView binary from paraview.org?
>>>
>>>  Thanks,
>>> Cory
>>>
>>> On Tue, Apr 14, 2015 at 11:49 AM, Adam Lyon <lyon at fnal.gov> wrote:
>>>
>>>> Hi Cory - I wanted to try this -- I loaded the state file and the data
>>>> file (thanks for the link). But when the python view tries to render, I
>>>> get,
>>>>
>>>>  Error: Cannot import matplotlib.backends.backend_agg.FigureCanvasAgg
>>>>
>>>>  and nothing appears. I'm running Paraview 4.3.1 64-bit on my Mac with
>>>> Yosemite.
>>>>
>>>>  Is this a Mac problem? Thanks! -- Adam
>>>>
>>>>        *------*
>>>>
>>>>  *Adam L. Lyon*
>>>> *Scientist; Associate Division Head for Systems for Scientific
>>>> Applications*
>>>>
>>>>  Scientific Computing Division & Muon g-2 Experiment
>>>> Fermi National Accelerator Laboratory
>>>>
>>>>
>>>
>>>
>>>  --
>>> Cory Quammen
>>> R&D Engineer
>>> Kitware, Inc.
>>>
>>
>>
>
>
>  --
> Cory Quammen
> R&D Engineer
> Kitware, Inc.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150414/13892312/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 72569 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150414/13892312/attachment-0001.png>


More information about the ParaView mailing list