Paraview 5.12 RC1 Error

Hello,

I’m testing the RC1 of version 5.12 and when I try to import the paraview.simple module to use it in a python script I get the following error:

ModuleNotFoundError: No module named '_paraview_modules_static'

During handling of the above exception, another exception occurred

I have added the following directories to the path:

    directories = [
        "lib/python310.zip"),
         f"lib/python3.10"),
        f"lib/python3.10/lib-dynload"),
        f"lib/python3.10/site-packages"),
    ]

If I use pvpython to run my script everything is fine.

Do you have any idea of why?

Hi !

to import paraview modules from external python, you should ensure different things are ok:

  • python version should match the one from pvpython
  • paraview modules should be added in PYTHONPATH environment
  • paraview lib should be added in PATH or LD_LIBRARY_PATH on linux

Hello,

can you provide a LD_LIBRARY_PATH example to see which directory I have to include. I just want to be sure on that

Best regards

I think something like

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:<pvdir>/lib

where <pvdir> is the root dir of your pv install

Does not solve the issue, I get the same error.
If I use a lower version of paraview is fine.

Any other suggestion?

Do you have more info in the error message ?

Here is also a similar bug: https://gitlab.kitware.com/paraview/paraview/-/issues/19667#note_695024 (older version and windows)

It is exactly the same bug, but there is no RC candidate without MPI to test the solution.
(I use Linux)

For reference 5.10.1 does not have this bug and works fine

maybe @ben.boeckel can have more input there

How does 5.11 behave? Note that the _paraview_modules_static module is a fallback if the normal on-disk ones aren’t found.