As you’ve already mentioned, the current PyTorch binaries are not built anymore for Python2.7.
I would guess the right approach would be to update the repository to use Python>=3.6.
Alternatively, you could try to build PyTorch from source using Python2.7 (with potentially some needed fixes) at your own risk.