Get source form here : https://files.pythonhosted.org/packages/89/83/5f5635fd0d91a08ac355dd9ca9bde34bfa6b29a5c59f703ad83d1ad0bf34/evdev-1.3.0.tar.gz Assuming source is in /home/tc, cd /home/tc tar zxf evdev-1.3.0.tar.gz cd evdev-1.3.0 python3.6 setup.py build sudo python3.6 setup.py install --root=/tmp/evdev-1.3.0 cd /tmp/evdev-1.3.0 for i in $(sudo find . -not -type d | grep "__pycache__") do rm -rf "$i" done cd /tmp sudo mksquashfs evdev-1.3.0 python3.6-evdev-1.3.0.tcz