I wonder if you could help me settle a small dispute with some colleagues. In short: they are convinced that it is for some reason “unsupported”, if not outright verboten, to install non-Python programs and libraries into a virtual environment created with
My opinion on this is of course you can do this: Beyond the magic bits supported by the Python interpreter and
site.py (e.g. for reading
pyvenv.cfg) it is no different from any other alternate install prefix. Installing, say, an autoconf package into a venv is little more than a matter of
./configure --prefix=$VIRTUAL_ENV && make && make install. Plus the usual caveats, e.g. of setting the correct
LDFLAGS to linking things that are not in the default library search path.
I have been doing this successfully, when necessary, for over a decade in virtual environments created with both
AFAICT the only source of their opinion on this is that none of the official docs either on packaging.python.org or docs.python.org explicitly mention this use case; I just assumed it’s not mentioned because it either goes without saying, or is safer to remain agnostic about.