This script is written in python two which is depreciated, and should be rewritten in python three, but I have so far been successful in not learning python. :-) to simplify debugging I have clarified that it needs a python two interpreter.
This script downloads an old version of mesa (an update may be appropriate), unfortunately the release candidate previously specified is no longer available, so an update to the next released version was made.