Restored env check for python