Go to the IDAPython binaries page.
Download the latest _linux.zip
file and extract it. In my case, it was idapython-6.9.0-python2.7-linux.zip
.
Follow the instructions in its README.txt
.
For simplicity, I have copy pasted the relevant portions here: