fixed automatically determine and set the PYRO_ENV variable