[Paraview] Problem importing vtk inside pvpython

Ganesh Vijayakumar ganesh.iitm at gmail.com
Thu May 5 13:57:25 EDT 2016


oh. This looks like it's getting out of scope this mailing list. Feel free
to ignore. I should probably file a bug report there. I'll just leave this
here for others to comment/see if they run into a similar problem.

https://packages.debian.org/testing/python/paraview-python
https://packages.debian.org/stretch/python-vtk6

I just checked. paraview-python depends on python-vtk6 which in turn
depends on libvtk6.2. I have all of them installed. Something else must be
up. Strangely there's a vtk module inside paraview itself which also fails
to import dataset_adapter. I don't know if this is a conflict or not.

ganesh at tesla:$ pvpython
Python 2.7.10 (default, Jul  1 2015, 10:54:53)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/vtk/__init__.py", line 39, in
<module>
    from vtkCommonCore import *
  File "/usr/lib/python2.7/dist-packages/vtk/vtkCommonCore.py", line 1, in
<module>
    from vtkCommonCorePython import *
TypeError: value must be a class or type
>>> import paraview.vtk
>>> import paraview.vtk.numpy_interface
>>> import paraview.vtk.numpy_interface.dataset_adapter
Segmentation fault
ganesh at tesla:$


My old python scripts used the dataset_adapter under a different tree
within the paraview module. Now it's broken. Crap!

ganesh

On Thu, May 5, 2016 at 11:30 AM Sebastien Jourdain <
sebastien.jourdain at kitware.com> wrote:

> I think you have VTK installed on your system which conflict with your
> ParaView one. Hence the segfault inside ParaView.
>
> Otherwise nothing should prevent you from doing pure VTK code in ParaView
> as long as you are aware of the possible issue when running remotely and/or
> in parallel.
>
>
> On Thu, May 5, 2016 at 11:03 AM, Ganesh Vijayakumar <ganesh.iitm at gmail.com
> > wrote:
>
>> Thanks. Could I reproduce what's going on here?
>>
>> https://blog.kitware.com/improved-vtk-numpy-integration/
>>
>>
>>
>> On Thu, May 5, 2016 at 10:41 AM Mathieu Westphal <
>> mathieu.westphal at kitware.com> wrote:
>>
>>> pvpython is a paraview client, and it is not suposed to execute vtk
>>> code, wich is executed on the server.
>>> in pvpython you can do:
>>> from paraview import *
>>>
>>> What are you trying to achieve ?
>>>
>>> Mathieu Westphal
>>>
>>> On Thu, May 5, 2016 at 5:40 PM, Ganesh Vijayakumar <
>>> ganesh.iitm at gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>>   I'm having trouble importing vtk inside pvpython while it imports
>>>> just fine inside python. I installed paraview-python with paraview-5.0.1
>>>> using debian stretch. Any ideas on why this might be the case?
>>>>
>>>> ganesh at tesla:~$ pvpython
>>>> Python 2.7.10 (default, Jul  1 2015, 10:54:53)
>>>> [GCC 4.9.2] on linux2
>>>> Type "help", "copyright", "credits" or "license" for more information.
>>>> >>> import vtk
>>>> Traceback (most recent call last):
>>>>   File "<stdin>", line 1, in <module>
>>>>   File "/usr/lib/python2.7/dist-packages/vtk/__init__.py", line 39, in
>>>> <module>
>>>>     from vtkCommonCore import *
>>>>   File "/usr/lib/python2.7/dist-packages/vtk/vtkCommonCore.py", line 1,
>>>> in <module>
>>>>     from vtkCommonCorePython import *
>>>> TypeError: value must be a class or type
>>>> >>>
>>>> >>>
>>>> Segmentation fault
>>>> ganesh at tesla:~$ python
>>>> Python 2.7.10 (default, Jul  1 2015, 10:54:53)
>>>> [GCC 4.9.2] on linux2
>>>> Type "help", "copyright", "credits" or "license" for more information.
>>>> >>> import vtk
>>>> >>>
>>>>
>>>> ganesh
>>>>
>>>> _______________________________________________
>>>> 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/20160505/316cb0df/attachment.html>


More information about the ParaView mailing list