fix environment variable setting for travis
fix things under python 2