Fix Python2/Python3 clash.

`generate_environment_variables.py` failed when called with Python 3, spamming users that have Python 3 as their default Python version (e.g. Arch Linux users).