You can not "Boot into a venv" and using source in a script is unreliable as it modifies the environment.
Just specify the full path to that environment’s Python interpreter when invoking Python.
You can also use a “shebang” line which points to the environment’s Python interpreter,
i.e. #!<path-to-venv>/bin/python (the <path-to-venv> MUST be a fully qualified path).
This is how scripts installed into the virtual environment work.
See Using Python Virtual Environments]
Just specify the full path to that environment’s Python interpreter when invoking Python.
You can also use a “shebang” line which points to the environment’s Python interpreter,
i.e. #!<path-to-venv>/bin/python (the <path-to-venv> MUST be a fully qualified path).
This is how scripts installed into the virtual environment work.
See Using Python Virtual Environments]
Statistics: Posted by Milliways — Tue May 20, 2025 4:37 am