I made a game in python and I want to use the keyboard to control the game but it not work.
I could not find the module in Pac-man so I used
pip install keyboard
I found that the keyboard module needed sudo so I ran it with sudo and I got this:
$ sudo python Snake_play.py
Traceback (most recent call last):
File "Snake_play.py", line 6, in <module>
import keyboard
ModuleNotFoundError: No module named 'keyboard'
can I not use the keyboard module in Linux?
is there an alternative?
not install with pip : lib is installed in home not system (and not use sudo with pip)
Exists in aur python-keyboard
(pamac build python-keyboard)
1 Like
?
so your saying that I should not install the keyboard module with pip?
ok I uninstalled it
so the correct way to install it is with
pamac build python-keyboard
?
is a aur package, we can’t use pacman but pamac, yay, …
1 Like
system
Closed
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.