Bit o' spack wisdom from the Spack Slack
"I have installed GDAL with Spack, and I'm trying to install pip install gdal in my python project. But the python bindings don't link with rpath, and end up not finding them."
"Yeah, for that you’ll probably want to add LD_LIBRARY_PATH to your prefix inspections. Something like:
spack config add "modules:prefix_inspections:./lib:[LD_LIBRARY_PATH]"
spack config add "modules:prefix_inspections:./lib64:[LD_LIBRARY_PATH]"