[Paraview] Importing paraview.simple with Python 3
Cory Quammen
cory.quammen at kitware.com
Wed Jun 7 13:24:49 EDT 2017
CC'ing back to the list
On Mon, Jun 5, 2017 at 2:25 PM, Nicholas Richmond
<nicholas.richmond at maine.edu> wrote:
> Thanks, Cory! I'll go ahead and compile ParaView with Python 3.
Sounds good. At the risk of stating the obvious, just make sure to
compile with the same Python 3.6 used in your environment.
Cory
>
> On Sat, Jun 3, 2017 at 12:53 AM, Cory Quammen <cory.quammen at kitware.com>
> wrote:
>>
>> Nick,
>>
>> One can indeed compile ParaView with Python 3. However, the binaries
>> available on paraview.org are built with Python 2.7. If you wish to
>> use Python 3, you will need to compile ParaView yourself against
>> Python 3.
>>
>> How exactly are you attempting to use the ParaView binary in a Python
>> 3.6 environment?
>>
>> Best,
>> Cory
>>
>> On Fri, Jun 2, 2017 at 5:50 PM, Nicholas Richmond
>> <nicholas.richmond at maine.edu> wrote:
>> > Greetings,
>> >
>> > First things first, I'm using the most recent (RC3) Win64 ParaView 5.4
>> > binary. I'm working on a project with Python 3.6, and I'm having
>> > difficulty
>> > importing the paraview.simple module. Attempting to import (from
>> > paraview.simple import *) results in the following error:
>> >
>> > ImportError: dynamic module does not define module export function
>> > (PyInit_vtkCommonCorePython)
>> >
>> > During handling of the above exception, another exception occurred:
>> >
>> > Traceback (most recent call last):
>> > File "<stdin>", line 1, in <module>
>> > File "C:\Program Files\ParaView
>> >
>> > 5.4.0-RC3-Qt5-OpenGL2-Windows-64bit\bin\Lib\site-packages\paraview\simple.py",
>> > line 43, in <module>
>> > from paraview import servermanager
>> > File "C:\Program Files\ParaView
>> >
>> > 5.4.0-RC3-Qt5-OpenGL2-Windows-64bit\bin\Lib\site-packages\paraview\servermanager.py",
>> > line 53, in <module>
>> > from paraview import vtk
>> > File "C:\Program Files\ParaView
>> >
>> > 5.4.0-RC3-Qt5-OpenGL2-Windows-64bit\bin\Lib\site-packages\paraview\vtk\__init__.py",
>> > line 7, in <module>
>> > from paraview.vtk.vtkCommonCore import *
>> > File "C:\Program Files\ParaView
>> >
>> > 5.4.0-RC3-Qt5-OpenGL2-Windows-64bit\bin\Lib\site-packages\paraview\vtk\vtkCommonCore.py",
>> > line 9, in <module>
>> > from vtkCommonCorePython import *
>> > ImportError: dynamic module does not define module export function
>> > (PyInit_vtkCommonCorePython)
>> >
>> > I saw this March 10 message from Utkarsh:
>> >
>> > "Python 3 is supported with 5.3 (except for ParaViewWeb components). We
>> > have
>> > dashboards testing it too. There still may be some leftovers, so please
>> > report if you catch anything that we missed."
>> >
>> > Does this fall under the category of "please report if you catch
>> > anything
>> > that we missed" or is it due to a lack of understanding on my part? I've
>> > been able to successfully import this module when using a Python 2.7
>> > environment, but I'm trying to stick to Python 3.6. Any insight would be
>> > most appreciated.
>> >
>> > Many thanks,
>> > Nick Richmond
>> >
>> > _______________________________________________
>> > 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
>> >
>>
>>
>>
>> --
>> Cory Quammen
>> Staff R&D Engineer
>> Kitware, Inc.
>
>
--
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
More information about the ParaView
mailing list