I had to pass the environmental variables to subprocess before. Have you tested that it works without it?