vtkCommonCorePython missing error in python3-paraview on Ubuntu 20

I’m trying to use paraview scripting within python3 for Ubuntu 20.04.1 LTS. If I open python3 on the command line I get the error

$> python3
Python 3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

from paraview.simple import *
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/python3/dist-packages/paraview/simple.py”, line 41, in
from paraview import servermanager
File “/usr/lib/python3/dist-packages/paraview/servermanager.py”, line 56, in
from paraview.modules.vtkPVServerImplementationCore import *
File “/usr/lib/python3/dist-packages/paraview/modules/vtkPVServerImplementationCore.py”, line 2, in
from . import vtkPVClientServerCoreCore
File “/usr/lib/python3/dist-packages/paraview/modules/vtkPVClientServerCoreCore.py”, line 2, in
from . import vtkPVCore
File “/usr/lib/python3/dist-packages/paraview/modules/vtkPVCore.py”, line 2, in
from . import vtkClientServer
File “/usr/lib/python3/dist-packages/paraview/modules/vtkClientServer.py”, line 3, in
from .vtkClientServerPython import *
ImportError: Failed to load vtkClientServerPython: No module named vtkmodules.vtkCommonCorePython

I have python3-paraview , paraview , paraview-dev , vtk7 , python3-vtk7 , etc installed from the synaptic installation manager. There are two files with vtkCommonCorePython inside the dist-packages directory :

/usr/lib/python3/dist-packages/vtk/vtkCommonCorePython.cpython-38-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/vtkmodules/vtkCommonCorePython.cpython-38-x86_64-linux-gnu.so

Searching the internet shows that other people have had similar problems, and solved it but including the paths to vtkCommonCorePython , but sys.path does include /usr/lib/python3/dist-packages , so vtkCommonCorePython should be found.

Can anybody see what might be missing in this case?

Many thanks! John

1 Like

Even I get the same error. Can someone please help?

Hi Maruthi, I had to give up on this due to time constraints and revert to Ubuntu 18. Now, I know this could be done using a docker within Ubuntu 20.

Did you try with the pvpython executable ? This is the recommended way