made python path/env  more robust