On 2/15/22, Martin Di Paola <martinp.dipa...@gmail.com> wrote: > > That's correct. I tried to be systematic in the analysis so I tested all > the possibilities.
Your test results were unexpected for `python3 -m venv xxx`. By default, virtual environments exclude the system and user site packages. Including them should require the command-line argument `--system-site-packages`. I'd check sys.path in the environment. Maybe you have PYTHONPATH set. > I had to test this myself because I didn't believe it but you are right. > Without having the venv activated, if the shebang explicitly points to > the python executable of the venv, the program will have access to the > libs installed in the environment. A virtual environment is configured by a "pyvenv.cfg" file that's either beside the executable or one directory up. Activating an environment is a convenience, not a requirement. -- https://mail.python.org/mailman/listinfo/python-list