Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5190

Python • Re: Syntax error when installing pynput with pip install pynput

$
0
0
A workaround may be to install an older version ... pip install pynput==1.5.0
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 -

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
I then get an error because I am connected via Telnet, don't have a graphical environment, but presume it will work if I did.

Statistics: Posted by hippy — Sun May 05, 2024 1:44 pm



Viewing all articles
Browse latest Browse all 5190

Trending Articles