gvalkov / python-evdev

Python bindings for the Linux input subsystem
https://python-evdev.rtfd.org/
BSD 3-Clause "New" or "Revised" License
336 stars 112 forks source link

Edev fails to install on ubuntu 18.04 with pip2 #185

Closed shu-agrointelli closed 1 year ago

shu-agrointelli commented 1 year ago
Collecting evdev>=1.3; "linux" in sys_platform
  Downloading evdev-1.6.1.tar.gz (26 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UUJ9OQ/evdev/setup.py'"'"'; __file__='"'"'/tmp/pip-install-UUJ9OQ/evdev/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-FCtNdV
         cwd: /tmp/pip-install-UUJ9OQ/evdev/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-UUJ9OQ/evdev/setup.py", line 103
        cmd = [sys.executable, 'evdev/genecodes.py', *headers]
                                                     ^
    SyntaxError: invalid syntax
sezanzeb commented 1 year ago

python2 has reached end of life three years ago https://www.python.org/doc/sunset-python-2/

you are running a distro that is almost 5 years old that will reach EOL as well in April https://ubuntu.com/blog/ubuntu-18-04-lts-end-of-life-keep-your-fleet-of-devices-up-and-running

Whatever you are doing, you should probably upgrade your ubuntu

shu-agrointelli commented 1 year ago

python2 has reached end of life three years ago https://www.python.org/doc/sunset-python-2/

you are running a distro that is almost 5 years old that will reach EOL as well in April https://ubuntu.com/blog/ubuntu-18-04-lts-end-of-life-keep-your-fleet-of-devices-up-and-running

Whatever you are doing, you should probably upgrade your ubuntu

You are absolutely correct, does this mean that python2 compatibility will be dropped from edev 1.6.1 and beyond?

sezanzeb commented 1 year ago

Judging from this commit https://github.com/gvalkov/python-evdev/commit/92c009a5001ebbfa94b535d8cff8c6ed9c51c35b python2 support has been dropped in 1.5.0

shu-agrointelli commented 1 year ago

Judging from this commit 92c009a python2 support has been dropped in 1.5.0

Alright, thx for your reply. It's impressive that it kept working with python2 and ubuntu 18 til 1.6.0.