Use python2.7 instead of python2.

The binary `python2` is not present on Debian systems.
The common denominator for Ubuntu, Debian, Arch is `python2.7`

Related to #6048.
Merge remote-tracking branch 'refs/remotes/ivan/bug/python2-compat' into develop