Try explicit passing of pexpect environment.