This is a special Python (or interpreted languages) issue in Spack as compiled packages use rpaths.
This can currently be accomplished by loading the Spack module with:
spack load -r py-libensemble
Or on some platforms by having a correct modules.yaml file present in $HOME/.spack/. It would be preferable if this automatically happens when the module is loaded using "module load". This may requires using Spack views.
https://spack.readthedocs.io/en/latest/command_index.html#spack-view
However, I have not as yet managed to get this to work for the libensemble package.