Or simply install the Python3 version using 'pip3' and then use Python3 which comes as standard with Buster. Using Buster 32-bit, ignore the numerous "Import error" messages; they are as expected -A workaround may be to install an older version ... pip install pynput==1.5.0
Code:
pi@Pi3B:~ $ pip3 install pynput...Sun May 5 14:35:13 2024 vendored cachecontrolSun May 5 14:35:13 2024 Import error, try module name...Installing collected packages: evdev, python-xlib, pynputSuccessfully installed evdev-1.7.0 pynput-1.7.6 python-xlib-0.33pi@Pi3B:~ $
Code:
pi@Pi3B:~ $ python3Python 3.7.3 (default, Mar 23 2024, 16:12:05)[GCC 8.3.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import pynput
Statistics: Posted by hippy — Sun May 05, 2024 1:44 pm