Try to set the first line to #!/usr/bin/python That should call the right python interpreter if it's still there. For background: https://github.com/paulhammond/webkit2png/issues/89 I tried to port it to python3 but failed.