Quantcast
Viewing all articles
Browse latest Browse all 4871

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

Dear all,
When I try to install pynput on my Raspberry Pi (Python 2.7.16)

For now, I'll sidestep your substantive question and refer you to - Sunsetting Python 2
https://www.python.org/doc/sunset-python-2/
We are volunteers who make and take care of the Python programming language. We have decided that January 1, 2020, was the day that we sunset Python 2. That means that we will not improve it anymore after that day, even if someone finds a security problem in it. You should upgrade to Python 3 as soon as you can.

Four years on, the problem you present with might be solved, or different, if you take that advice.


Seems OK with Python3 under 64-bit RasPiOS Bookworm -

Code:

david@rp54bw64full0512:~/Support/woodz $ python -m venv --system-site-packages woodzdavid@rp54bw64full0512:~/Support/woodz $ source woodz/bin/activate(woodz) david@rp54bw64full0512:~/Support/woodz $ python -m pip install pynputLooking in indexes: https://pypi.org/simple, https://www.piwheels.org/simpleCollecting pynput  Downloading https://www.piwheels.org/simple/pynput/pynput-1.7.6-py2.py3-none-any.whl (79 kB)     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.9/79.9 kB 1.1 MB/s eta 0:00:00Requirement already satisfied: six in /usr/lib/python3/dist-packages (from pynput) (1.16.0)Collecting evdev>=1.3  Downloading evdev-1.7.0.tar.gz (30 kB)  Installing build dependencies ... done  Getting requirements to build wheel ... done  Installing backend dependencies ... done  Preparing metadata (pyproject.toml) ... doneCollecting python-xlib>=0.17  Downloading https://www.piwheels.org/simple/python-xlib/python_xlib-0.33-py2.py3-none-any.whl (182 kB)     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 182.1/182.1 kB 1.3 MB/s eta 0:00:00Building wheels for collected packages: evdev  Building wheel for evdev (pyproject.toml) ... done  Created wheel for evdev: filename=evdev-1.7.0-cp311-cp311-linux_aarch64.whl size=92063 sha256=4ce49a77823db7bea1ebe70f2978644bc5fa0976244eb69222717dfe831a7879  Stored in directory: /home/david/.cache/pip/wheels/b0/4b/ad/fa410bf51b9951ab114dc98d5e1030ef60afdc3a006038f3adSuccessfully built evdevInstalling collected packages: python-xlib, evdev, pynputSuccessfully installed evdev-1.7.0 pynput-1.7.6 python-xlib-0.33(woodz) david@rp54bw64full0512:~/Support/woodz $ 

Statistics: Posted by B.Goode — Sat May 04, 2024 8:55 pm



Viewing all articles
Browse latest Browse all 4871

Trending Articles