Just ran into the little wonder that is "pip install PIL", which results in a useless PIL (i.e. one without JPEG, PNG or TrueType support, but which imports, so doesn't trigger the "I don't have PIL code paths"). There's other cases with e.g. PostgreSQL drivers, or complex GUI libraries, where if you don't happen to have a toolchain installed you are out-of-luck on the install, and really, you'd rather just use the .deb file version anyway. What I'd really like is something like this:

pip install --link-system PIL psycopg2 pygame

where the 3 packages there would be looked up in the system Python corresponding to the Python in the virtualenv and links would be created from venv/lib/pythonX.Y/site-packages to the system-level packages (if it's more reliable, copy the files, I really don't mind).

Does something already do this elegantly/cleanly? I have a stupid little script that works for the few libraries I have (basically just imports them, printing out the paths, which I then script to create the links), but I really want something where I can just add a flag (or whatever) to the requirements file so that the whole thing is transparent (save that if the library isn't installed at the system level the user gets told to install it manually (or something)).