Tested on Ubuntu 18.04
sudo apt update && sudo apt install -y git python3 python3-pip python3-dbus libcairo2 libpangocairo-1.0-0 libxcb-render0-dev libffi-dev
pip3 install xcffib cairocffi
cd /tmp
git clone git://github.com/qtile/qtile.git
cd qtile
sudo python3 setup.py install
qtile --version
Done! :)