This is maybe more of a bug report than a patch offer :
the correct way to do this would be for someone understanding the history of this OpenEXR
environment variable to properly maintain the script.
But this patch has the merit of hammering the problem away, so maybe it can be helpful.
Other than that, I only had a separate issue with Embree (and python) when building all from source.
BR, Maxime