gvalkov/python-evdev

Unable to install via pip on Arch Linux/Python 3.10.9

RedGlare96 opened this issue · 2 comments

Pip seems to encounter a Subprocess error when running setup.py for evdev on Arch Rolling

Running setup.py install for evdev ... error
error: subprocess-exited-with-error

  × Running setup.py install for evdev did not run successfully.
  │ exit code: 1
  ╰─> [73 lines of output]
      running install
      /home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/util.py -> build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/uinput.py -> build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/genecodes.py -> build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/ff.py -> build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/evtest.py -> build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/events.py -> build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/eventio_async.py -> build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/eventio.py -> build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/ecodes.py -> build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/device.py -> build/lib.linux-x86_64-cpython-310/evdev
      copying evdev/__init__.py -> build/lib.linux-x86_64-cpython-310/evdev
      running build_ext
      running build_ecodes
      writing ecodes.c (using /usr/include/linux/input.h /usr/include/linux/input-event-codes.h /usr/include/linux/uinput.h)
      /bin/sh: line 1: /home/breadcomp/Documents/ML: No such file or directory
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-drwf1584/evdev_e603f31dd7cc4b54919703d6a15bc71e/setup.py", line 151, in <module>
          setup(**kw)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/command/install.py", line 68, in run
          return orig.install.run(self)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 698, in run
          self.run_command('build')
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/tmp/pip-install-drwf1584/evdev_e603f31dd7cc4b54919703d6a15bc71e/setup.py", line 138, in run
          self.run_command(cmd_name)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/tmp/pip-install-drwf1584/evdev_e603f31dd7cc4b54919703d6a15bc71e/setup.py", line 125, in run
          create_ecodes(self.evdev_headers)
        File "/tmp/pip-install-drwf1584/evdev_e603f31dd7cc4b54919703d6a15bc71e/setup.py", line 106, in create_ecodes
          check_call(cmd, cwd="%s/evdev" % here, shell=True)
        File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '/home/breadcomp/Documents/ML SNCF/Sncf_Ml_Script/mlvenv/bin/python genecodes.py /usr/include/linux/input.h /usr/include/linux/input-event-codes.h /usr/include/linux/uinput.h > ecodes.c' returned non-zero exit status 127.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> evdev

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

ssieb commented

The problem is that you have a space in your path and somewhere it's not quoted sufficiently.

Thanks. Fixed in 66aa090.