mouse library demands root access - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: mouse library demands root access (/thread-34203.html) |
mouse library demands root access - ineuw - Jul-07-2021 Using either pip3 install mouse and sudo pip3 install mouse generate the following error when importing the library into a script (Autokey). # [win + z] import mouse, time i = 1 while i < 2: mouse.move(265, 116, absolute=True, duration=0.2) time.sleep(0.2) keyboard.wait_for_keypress("<escape>", timeOut=1.0) mouse.click("right") ### time.sleep(0.2) keyboard.send_keys("<alt>+<shift>+s") i = 1What am I doing wrong?
RE: mouse library demands root access - deanhystad - Jul-07-2021 You need to run your program as root. It is listed as a limitation of the package. Quote:Known limitations:Have you lookd at PyAutoGUI? RE: mouse library demands root access - ineuw - Jul-08-2021 Apologies for the delay in replying. Many thanks for your advice. PyAutoGUI is installed, but haven't used it yet. That's next. |