# Superbuild with custom python version crashes after running script

**URL:** https://discourse.paraview.org/t/superbuild-with-custom-python-version-crashes-after-running-script/8716
**Category:** ParaView Support
**Created:** [December 30, 2021, 7:54pm UTC](https://discourse.paraview.org/t/superbuild-with-custom-python-version-crashes-after-running-script/8716 "2021-12-30T19:54:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![anthomas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/anthomas/32/7342_2.png) [@anthomas](https://discourse.paraview.org/u/anthomas)
#### Post date: [December 30, 2021, 7:54pm UTC](https://discourse.paraview.org/t/superbuild-with-custom-python-version-crashes-after-running-script/8716/1 "2021-12-30T19:54:54Z")

</div>

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 -

 ![interpreterPath](https://discourse.paraview.org/uploads/default/original/2X/b/b16f26bd21cfb650818df753320d8878ecde2663.jpeg)

pvpython -

 ![pvpythonPath](https://discourse.paraview.org/uploads/default/original/2X/6/640d162cbf0f1cdd658fffe2216fc289192bbc10.jpeg)

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