input-remapper
input-remapper copied to clipboard
Module missing
axilotl@tiramisu ~ [1]> sudo pkill -f input-remapper && input-remapper-gtk -d Traceback (most recent call last): File "/usr/bin/input-remapper-gtk", line 38, in <module> from inputremapper.gui.gettext import _, LOCALE_DIR ModuleNotFoundError: No module named 'inputremapper'
Can't even run suggested command. reinstalled several times, to no effect. Same error when running input-remapper-control.
Using Arch, input-remapper-git on the AUR.
I have the same problem. Manjaro, gnome, wayland.
input-remapper-gtk ─╯
Traceback (most recent call last):
File "/usr/bin/input-remapper-gtk", line 38, in <module>
from inputremapper.gui.gettext import _, LOCALE_DIR
ModuleNotFoundError: No module named 'inputremapper'
Same here (Archlinux/AUR too). Was working before it doesn't :-)
Same thing here: Arch Linux with Wayland. Usinginput-remapper-git
Traceback (most recent call last):
File "/usr/bin/input-remapper-control", line 30, in <module>
from inputremapper.logger import logger, update_verbosity, log_info
ModuleNotFoundError: No module named 'inputremapper'
Same. Manjaro, Gnome, Wayland
i got it to run as root, using sudo, but without it i get :
Gtk-Message: 11:54:18.672: Failed to load module "appmenu-gtk-module" input-remapper-gtk 2.0.1 f5151aab27ae0e7d8b1f0c80ce92a718e3a86e71 https://github.com/sezanzeb/input-remapper python-evdev 1.7.0 pkexec must be setuid root ERROR: Failed to pkexec the reader-service, code 32512
Manjaro, KDE, X11 ( can't get wayland to render anything on my old nvidia gpu)
systemctl enable input-remapper
no error
systemctl start input-remapper
Job for input-remapper.service failed because the control process exited with error code. See "systemctl status input-remapper.service" and "journalctl -xeu input-remapper.service" for details.
journalctl -xeu input-remapper.service
Jun 17 11:57:49 input-remapper-service[29694]: ModuleNotFoundError: No module named 'inputremapper' Jun 17 11:57:49 systemd[1]: input-remapper.service: Main process exited, code=exited, status=1/FAILURE ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: https://forum.manjaro.org/c/support ░░ ░░ An ExecStart= process belonging to unit input-remapper.service has exited. ░░ ░░ The process' exit code is 'exited' and its exit status is 1. Jun 17 11:57:49 systemd[1]: input-remapper.service: Failed with result 'exit-code'. ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: https://forum.manjaro.org/c/support ░░ ░░ The unit input-remapper.service has entered the 'failed' state with result 'exit-code'. Jun 17 11:57:49 systemd[1]: Failed to start Service to inject keycodes without the GUI application. ░░ Subject: A start job for unit input-remapper.service has failed ░░ Defined-By: systemd ░░ Support: https://forum.manjaro.org/c/support ░░ ░░ A start job for unit input-remapper.service has finished with a failure. ░░ ░░ The job identifier is 3805 and the job result is failed.
I've tried yay, manually w/ pip and pacman via git clone installations.
System:
uname -r 6.9.3-3-MANJARO
python -VV
Python 3.11.9 (main, Apr 19 2024, 18:35:38) [GCC 13.2.1 20230801]
I have the same issue on Manjaro Gnome
× input-remapper.service - Service to inject keycodes without the GUI application
Loaded: loaded (/usr/lib/systemd/system/input-remapper.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Tue 2024-06-25 19:01:09 EDT; 20s ago
Process: 21279 ExecStart=/usr/bin/input-remapper-service (code=exited, status=1/FAILURE)
Main PID: 21279 (code=exited, status=1/FAILURE)
CPU: 111ms
Jun 25 19:01:08 terry-manjaro systemd[1]: Starting Service to inject keycodes without the GUI application...
Jun 25 19:01:09 terry-manjaro input-remapper-service[21279]: Traceback (most recent call last):
Jun 25 19:01:09 terry-manjaro input-remapper-service[21279]: File "/usr/bin/input-remapper-service", line 28, in <module>
Jun 25 19:01:09 terry-manjaro input-remapper-service[21279]: from inputremapper.logger import update_verbosity, log_info
Jun 25 19:01:09 terry-manjaro input-remapper-service[21279]: ModuleNotFoundError: No module named 'inputremapper'
Jun 25 19:01:09 terry-manjaro systemd[1]: input-remapper.service: Main process exited, code=exited, status=1/FAILURE
Jun 25 19:01:09 terry-manjaro systemd[1]: input-remapper.service: Failed with result 'exit-code'.
Jun 25 19:01:09 terry-manjaro systemd[1]: Failed to start Service to inject keycodes without the GUI application.
System:
uname -a
Linux terry-manjaro 6.1.92-1-MANJARO #1 SMP PREEMPT_DYNAMIC Mon May 27 03:37:00 UTC 2024 x86_64 GNU/Linux
uname -r
6.1.92-1-MANJARO
Resolved. You just need to rebuild the whole package.
Rebuilding doesn't work for me.
I reinstalled through gnome's Add/Remove Software, rather than pacman, and version 2.0.1r10.g7586ad99-1 runs fine for me in Gnome 46.4 👍🏿
I also had this issue on Arch. For me it was because I had a pyenv version other than the system one set on install. It looks like the install script respects the pyenv PATH, but when you run the script as a command with a shebang it's not using the pyenv path. So it can't find any of the input-remapper files. To solve it I uninstalled, ran pyenv global system to reset the pyenv version, then reinstalled, and it works.
This seems like a bug with either the installer or the imports, they don't agree on whether to use the pyenv PATH.
To debug problems with imports:
- Do
find /usr -name inputremapperto find possibly multiple installations of the inputremapper package, depending on python paths and stuff. You most likely only want to have one installation. Try to remove all others. Also check~/.local/lib/python3.12/site-packages/input-remapper.egg-link,/usr/local/lib/python3.12/dist-packages/easy-install.pthand~/.local/lib/python3.12/site-packages/easy-install.pthfor leftovers. - Beware, that input-remapper starts/needs some privileged processes, and therefore needs system-wide installed packages in
/usr/lib/...or/usr/local/lib/.... - You can do something like
import sys; print(sys.path)to figure out your python paths, that might help you. inputremapper has to be in one of those folders. - If you are able to import inputremapper in some cases, you can also try
import inputremapper; print(inputremapper.__file__)to figure out from where you are currently importing inputremapper
Apart from that, input-remapper hasn't been using the recommended shebang. This will be fixed in https://github.com/sezanzeb/input-remapper/pull/992, and might help some of you.