Building Paraview Superbuild with custom python version

I am trying to build the paraview superbuild (v5.9.1) with a version of python that has extra modules. The project successfully builds, but when I run paraview I receive a message stating: “Python support not available!” I have tried including my python installation in the superbuild/python3/src directory but nothing changes.

Sounds to me like the environment variable PYTHONPATH needs to be set…

From my understanding, the PYTHONPATH variable needs to be set with the output of the sys.path command in the python environment. I created a batch file in the build directory of the superbuild as follows with no success:

set ROOT_PATH=%cd%

set LD_LIBRARY_PATH=%ROOT_PATH%\superbuild\paraview\build\lib;%LD_LIBRARY_PATH%

set PYTHON_DIR=%ROOT_PATH%\superbuild\python3\src


start %ROOT_PATH%\superbuild\paraview\build\bin\paraview.exe

This means paraview was not built with python. Which superbuild option are you turning on/off ?

Python3 enabled
USE_SYSTEM_python3 enabled
Python3_EXECUTABLE set to my python.exe
Python3_INCLUDE_DIR set to my python include directory
Python3_LIBRARIES set to my python libs/python39.lib file

I think the issue might be that I didnt set ‘Python enabled,’ however when I did there was issues finding Python2. What do I need to do to fix that? Are there separate variables specifically for python and python2?

That should be enough, you may want to open an issue on :


You can just ignore the python2 messages. The superbuild supported 2 and 3 and had a mechanism to support both (but not at once). ParaView dropped Python2 support and removed it and the mechanism just complains that Python2 is not even available. You’ll need to ENABLE_python=ON in 5.9.1 (5.10 shouldn’t have anything Python2-related).

I have been working with the superbuild using a custom python version on windows-

When building I set these cmake variables:

  • ENABLE_python=True
  • ENABLE_python3=True
  • Python3_EXECUTABLE=…/python.exe
  • Python3_INCLUDE_DIR=…/include
  • Python3_LIBRARY=…/python39.dll

Executing scripts with the interpreter that is copied to the superbuild directory works great, and the custom modules that I wanted to install are available in pvpython. However, when I execute any script using the vtkPythonInterpreter or the paraview python shell, paraview immediately closes after finishing execution. I have found that the sys.path for pvpython and the python interpreter from my installation differ significantly:

interpreter -

pvpython -

I have also tried setting my Path and PYTHONPATH environmental variables before executing paraview with no success.