Update environ.py so that it works with latest sdk