Adding an output option to pvpython to show necessary environment variables for importing ParaView into python


I’m working on some testing functionality for code that does some ParaView processing through Python. This is for a ParaView install from the download page and not a ParaView that I built myself. I’m not sure this matters though.

What I’m wondering is how feasible it would be to add a command line option to pvpython that would print out the necessary environment variables (e.g. PYTHONPATH, LD_LIBRARY_PATH, and any others that are needed) that I’d need to set while running python so that I could import paraview into that python session. It may also be useful to include which Python version should be used as well.




That should be possible I would think.

As a workaround until that feature is added, you can get PYTHONPATH with

import sys