[Paraview] Paraview and Python related question

Marco Nawijn nawijn at gmail.com
Wed Sep 23 12:04:02 EDT 2015


Hi,

I think you should *add* the Paraview
path to the environment variable. Now
you overwrite it. So the typical syntax
is (bash):

export avar=adir:$avar

(Send from my phone, so I hope the formatting is reasonable).

Marco
Op 23 sep. 2015 01:16 schreef "Amit Goel" <Amit.Goel at ucf.edu>:

> There is this weird behaviour :
>
> fluid:~ armando$ export DYLD_LIBRARY_PATH=/lib
> fluid:~ armando$ idle
>
> idle works just fine even if I point DYLD_LIBRARY_PATH to anything… as in
> above example /lib
>
> But when I set it to paraview:
>
> fluid:~ armando$ export
> DYLD_LIBRARY_PATH=/Applications/ArmandoApps/paraview.app/Contents/Libraries/
> fluid:~ armando$ idle
> ** IDLE can't import Tkinter.
> Your Python may not be configured for Tk. **
>
> I get tkinter error.
>
> Any ideas anyone please ?
>
> Regards
>
> amit
>
>
> On Sep 22, 2015, at 2:03 PM, Amit Goel <amit.goel at ucf.edu> wrote:
>
> Thanks for the help. When I set DYLD now the idle stops working:
>
> fluid:~ armando$ export
> DYLD_LIBRARY_PATH=/Applications/ArmandoApps/paraview.app/Contents/Libraries/:$DYLD_LIBRARY_PATH
> fluid:~ armando$ export
> PYTHONPATH=/Applications/ArmandoApps/paraview.app/Contents/Python/vtk:/Applications/ArmandoApps/paraview.app/Contents/Python:$PYTHONPATH
> fluid:~ armando$ idle
> ** IDLE can't import Tkinter.
> Your Python may not be configured for Tk. **
>
> I have python and py-tkinter installed using macports and if I open a new
> terminal, idle just works fine.
>
> I am searching on Macports / python and other forums… if anyone on
> paraview list has encountered it before please let me know.
>
> Regards
>
> amit
>
>
> On Sep 22, 2015, at 1:35 PM, Shawn Waldon <shawn.waldon at kitware.com>
> wrote:
>
> Hi Amit,
>
> Since you appear to be using OSX, the environment variable you want is
> DYLD_LIBRARY_PATH, not LD_LIBRARY_PATH.
>
> HTH,
> Shawn
>
> On Tue, Sep 22, 2015 at 1:32 PM, Amit Goel <Amit.Goel at ucf.edu> wrote:
>
>> Hi
>>
>> I downloaded the Paraview app and put it in a folder. Then I tried
>> following instructions on this page:
>> http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/quick-start.html
>>
>> export
>> PYTHONPATH=/Applications/ArmandoApps/paraview.app/Contents/Python:$PYTHONPATH
>> export
>> LD_LIBRARY_PATH=/Applications/ArmandoApps/paraview.app/Contents/Libraries/:$LD_LIBRARY_PATH
>>
>> and I get this error:
>>
>> Python 2.7.10 (default, Sep 14 2015, 23:52:44)
>> [GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
>> Type "copyright", "credits" or "license()" for more information.
>> >>> from paraview.simple import *
>> Error: Could not import vtkCommonComputationalGeometryPython
>>
>> Traceback (most recent call last):
>>   File "<pyshell#0>", line 1, in <module>
>>     from paraview.simple import *
>>   File
>> "/Applications/ArmandoApps/paraview.app/Contents/Python/paraview/simple.py",
>> line 39, in <module>
>>     import servermanager
>>   File
>> "/Applications/ArmandoApps/paraview.app/Contents/Python/paraview/servermanager.py",
>> line 48, in <module>
>>     import paraview, re, os, os.path, new, sys, atexit, vtk
>>   File
>> "/Applications/ArmandoApps/paraview.app/Contents/Python/paraview/vtk/__init__.py",
>> line 7, in <module>
>>     from vtkCommonCorePython import *
>> ImportError: No module named vtkCommonCorePython
>> >>>
>>
>> When i add vtk subfolder also to PYTHONPATH, I get this error:
>>
>> ImportError:
>> dlopen(/Applications/ArmandoApps/paraview.app/Contents/Python/vtk/vtkCommonCorePython.so,
>> 2): Library not loaded:
>> @executable_path/../Libraries/libvtkCommonCorePython27D-pv4.3.1.dylib
>>   Referenced from:
>> /Applications/ArmandoApps/paraview.app/Contents/Python/vtk/vtkCommonCorePython.so
>>   Reason: image not found
>>
>> vtkCommonCorePython.so is present in LD_LIBRARY_PATH set earlier.
>>
>> So question is: Am I following correct instructions ?
>>
>> I guess there are three scenarios I would be working with in coming days:
>>
>> 1. python code to run default python.app on my local MacOS, read H5Part
>> file and visualize it.
>> 2. python code to run compiled python on my cluster
>> 3. python code to run compiled python server on my cluster
>>
>> I dont know yet what would the difference in 2nd and 3rd point but for
>> now I am trying to write a python script that would start python and open a
>> file and visualize it.
>>
>> Any help would be highly appreciated.
>>
>> Regards
>>
>> Amit
>>
>>
>> _______________________________________________
>> 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
>>
>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview
>>
>>
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150923/fc4d21a4/attachment.html>


More information about the ParaView mailing list