Problem with creating venv on mac

Following the guide at Install any python package for the ParaView binary release using pip, I’m running into a problem on macOS. When I run pvpython -m venv ~/.venv on my M4 mac (ParaView 6.0.0-RC2), I get a mysterious error:

/Applications/ParaView-6.0.0-RC2.app/Contents/bin/pvpython -m venv ~cory.quammen/.venv
Error: [Errno 2] No such file or directory: '/Users/cory.quammen/.venv/bin/vtkpython'

/Users/cory.quammen/.venv/bin/vtkpython exists, but it is a link to /Applications/ParaView-6.0.0-RC2.app/Contents/Libraries/vtkpython, which does not exist. I’m not sure why vtkpython is referenced at all.

Is venv now using the interpreter-reported binary name perhaps? I don’t see ParaView calling SetProgramName or setting vtkPythonInterpreter::InitializeWithArgs’s programName argument.

It must be:

$ /Applications/ParaView-6.0.0-RC2.app/Contents/bin/pvpython 
import sysPython 3.12.7 (main, Jul  2 2025, 12:31:09) [Clang 16.0.0 (clang-1600.0.26.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.executable
'/Applications/ParaView-6.0.0-RC2.app/Contents/Libraries/vtkpython'

It does. Tracing through on my Mac, I see

That doesn’t seem to be a mac-specific code path, however.

iirc there is an override in ParaView code some way or another. And this override was not possible for macOS, maybe ?

More investigation needed.

1 Like