paraview python conflicts with my local python

Hi everyone,

I downloaded the newest paraview on my ubuntu machine (ParaView-5.11.0-RC2-MPI-Linux-Python3.9-x86_64.tar.gz)
I start paraview and do ‘start trace’
or: I start pvpython

I then get a bunch of errors, the last 4 lines looking like this:

3 0x7f223e92033b /home/user/Codes/ParaView-5.11.0-RC2-MPI-Linux-Python3.9-x86_64/bin/…/lib/libpython3.9.so.1.0(+0x12033b) [0x7f223e92033b]
2 0x7f21efe9486f /home/user/.local/lib/python3.9/site-packages/vtkmodules/vtkCommonCore.cpython-39-x86_64-linux-gnu.so(+0x14586f) [0x7f21efe9486f]
1 0x7f2206225b72 /home/user/Codes/ParaView-5.11.0-RC2-MPI-Linux-Python3.9-x86_64/bin/…/lib/libvtkWrappingPythonCore3.9-pv5.11.so.1(+0x25b72) [0x7f2206225b72]
0 0x7f2243e01520 /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f2243e01520]
( 0.314s) [paraview ] :0 FATL| Signal: SIGSEGV

Note that line (2) is using my local python 3.9 site packages in .local/python3.9. If I rename this folder so it cannot be found, everything seems to work. But how can I make paraview not use this folder? I am not even sure how paraview knows that this folder exists, because when I do python -m site I get references to only the newer python 3.10 version (and paraview has no problem with that folder existing):

sys.path = [
‘/usr/lib/python310.zip’,
‘/usr/lib/python3.10’,
‘/usr/lib/python3.10/lib-dynload’,
‘/home/user/.local/lib/python3.10/site-packages’,
‘/usr/local/lib/python3.10/dist-packages’,
‘/usr/lib/python3/dist-packages’,
‘/usr/lib/python3.10/dist-packages’,
]
USER_BASE: ‘/home/user/.local’ (exists)
USER_SITE: ‘/home/user/.local/lib/python3.10/site-packages’ (exists)
ENABLE_USER_SITE: True

So my question is basically: why does paraview look into .local and how can I prevent it (assuming that it is not necessary)?

It’s probably just what Python does by default. We’d need to figure out what flag(s) to pass to Python’s build to skip that (if it even exists).