How To Specify Python Interpreter for ParaView

Hi, Guys,
I have built a ParaView executable and added many python Macros to it.
Then I want to distribute my executable to my friends. Everything works as expected except someone has Python 3.7 installed on his PC that paraview crashes when running Macros. I have tested that reinstall Python 3.6.5 will fix it.

So my question is:
Can I specify a python interpreter for paraview(Specific version or packed with paraview executable), or compile a Paraview Executable in which python interpreter can be manually configured.

my build configurations:
Win10
Visual Studio 12 2013 Win64
Python 3.6.5
Qt 5.9

Not at run-time, at least not yet.

Most definitely, set the cmake option PYTHON_EXECUTABLE

However, difference between Python 3.7 nd Python 3.6.5 are minimal, so maybe fixing the error is worthwhile.

Thanks for your replay,
I have debug the process, ParaView crash at Py_InitializeEx(vtkPythonInterpreter.cxx:246) in vtkPythonInterpreter::Initialize().
It seems that it cannot find python.exe for different version. So would it be possible to use Paraview compiled with PYTHON_EXECUTABLE={python3.6} in a PC with python 3.7 installed?

btw, how does ParaView executable find python interpreter? Maybe modify Windows Register table entry or Environment Variable can make it works? Since I have tested my Macro code can run both in python 3.6 and 3.7.

Not supported, you will have to build ParaView yourself or figure out why your script is not working with Python 3.7