I am encountering a compatibility issue when attempting to use both ParaView and PyVista within the same Python virtual environment. The problem seems to stem from conflicts in the VTK versions required by these two libraries. When I install both libraries, I encounter the following error upon importing ParaView:
>>> import paraview
Traceback (most recent call last):
File "/opt/miniconda/envs/para/lib/python3.13/site-packages/paraview/__init__.py", line 217, in <module>
from .modules import vtkRemotingCore
ImportError: Failed to load vtkRemotingCore: No module named paraview.modules.vtkRemotingClientServerStream
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
import paraview
File "/opt/miniconda/envs/para/lib/python3.13/site-packages/paraview/__init__.py", line 219, in <module>
import _paraview_modules_static
ModuleNotFoundError: No module named '_paraview_modules_static'
System Details:
- Base Docker Image:
nvidia/cuda:12.6.2-cudnn-runtime-ubuntu22.04
- Python Version:
>=3.9
(tried multiple versions, including 3.13.1) - ParaView Versions Tried:
5.8.0
to5.13.1
(via Conda) - PyVista Versions Tried:
0.20.1
to0.44.2
(via Conda) - Environment Manager: Conda (with virtual environment)
If I understand well the conflict arises because ParaView ships with its own bundled VTK installation, while PyVista requires a separate VTK version. Installing PyVista results in overwriting the ParaView-specific VTK, which subsequently breaks the ParaView installation and leads to the aforementioned import error.
Questions:
- Is there a known workaround to use both ParaView and PyVista in the same Python virtual environment?
- Would it be possible to configure ParaView to use the VTK installed by PyVista, or vice versa, without breaking functionality?
If anyone has encountered similar issues or has insights on how to work around this limitation, your guidance would be greatly appreciated!
Thank you for your help!