KeyboardLayoutEditor is written in Python 2
To see the versions of Python installed run
update-alternatives --list python
sudo apt install python2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 2
Install Python 2 Package Manager
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
Install libraries user by KLE
sudo apt-get install libgirepository1.0-dev gcc libcairo2-dev pkg-config python2-dev gir1.2-gtk-3.0
sudo pip install pycairo
sudo pip install PyGObject
sudo pip install paramiko
sudo apt-get install libpango-1.0-0
sudo apt-get install python-lxml
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-glade2_2.24.0-5.1ubuntu2_amd64.deb
sudo apt-get install ./python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
sudo apt-get install ./python-glade2_2.24.0-5.1ubuntu2_amd64.deb
Setup one-time KLE
git clone https://github.com/simos/keyboardlayouteditor.git
cd keyboardlayouteditor/
sudo pip install http://www.antlr3.org/download/Python/antlr_python_runtime-3.1.2.tar.gz
wget http://www.antlr3.org/download/antlr-3.1.2.jar
java -classpath antlr-3.1.2.jar org.antlr.Tool *.g
Run the KLE
./KeyboardLayoutEditor
After using KLE, change python version to 3
sudo update-alternatives --config python