@Phlurim I don't know anything about tabulate thus I can't help but anyway, I don't know why an external keyboard would be necessary. And you can always connect via Bluetooth your Mac keyboard to try if it helps. Good luck
Édit: you can use pip to install tabulate. And you can use pip via stash which can be installed via only one line, see the linked page
import requests as r; exec(r.get('https://bit.ly/get-stash').content)