timothycrosley / streamdeck-ui

A Linux compatible UI for the Elgato Stream Deck.
https://timothycrosley.github.io/streamdeck-ui/
MIT License
1.12k stars 240 forks source link

Multiple dependency errors while trying to install Streamdeck UI on Fedora 37. #288

Closed pblanton closed 1 year ago

pblanton commented 1 year ago

Description When I run the fedora_install.sh script I get

The headers or library files could not be found for zlib, a required dependency when compiling Pillow from source.

To Reproduce Steps to reproduce the behavior: Installed Fedora 37 on clean machine. Not VM.

I tried the pre-cooked script and I get the aforementioned zlib / pillow error. So I then tried the step-by-step method and this command pip3 install streamdeck-ui --user gives me the same error.

Expected behavior I'd expect the script to run and install Streamdeck-UI

Screenshots I included a screenshot of my system details.

Screenshot from 2022-12-30 16-46-26

I didn't include screenshots of the error, but I did capture the entire output from the script run and attach it.

streamdeck install run.txt

Operating system (please complete the following information)

Stream Deck Version

pblanton commented 1 year ago

I had to run the install command as sudo.

sudo pip3 install streamdeck-ui --user

I don't like that, but now it seems to be installing. At least we're past the zlib / pillow error

UPDATE: Nope. Still pillow error. I've tried forcing an upgrade of pip, and even forcing a pip downgrade to 19.3.1 as mentioned here: https://github.com/python-pillow/Pillow/issues/4242#issuecomment-579671142

The new bash output is here: streamdeck install run.txt

pblanton commented 1 year ago

I'm stuck here:

DEPRECATION: hidapi is being installed using the legacy 'setup.py install' method, because it does not have a
'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible
replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

Full error is here: streamdeck install hidapi error.txt

pblanton commented 1 year ago

Sorry I haven't had more time to try to troubleshoot this. I hit the ground running work-wise when the office opened back up after the holidays. I have though realized just how attached I am to my streamdeck and sure miss it. If I have time to try some things I'll post them here whether or not they work.

I have switched my Fedora 37 from Wayland to X11 just to see if it would get me over the hump, alas it did not.

pblanton commented 1 year ago

I got an error that indicated that Python 3.11 may not be supported for some dependencies, so I installed python 3.10 and pip...

sudo dnf install python3.10
python3.10 -m ensurepip --upgrade

and re-ran the installer...

python3.10 -m pip install streamdeck-ui --user

Now I am stuck on building and installing evdev

Installing collected packages: webencodings, filetype, evdev, tinycss2, streamdeck, six, shiboken2, pycparser, pillow, defusedxml, python-xlib, pyside2, cssselect2, cffi, pynput, cairocffi, CairoSVG, streamdeck-ui
  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
  ╰─> [31 lines of output]
      running install
      /home/pblanton/.local/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)
      building 'evdev._input' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/evdev
      gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.10 -c evdev/input.c -o build/temp.linux-x86_64-cpython-310/evdev/input.o -std=c99 -Wno-error=declaration-after-statement
      evdev/input.c:10:10: fatal error: Python.h: No such file or directory
         10 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

Yes, I have gcc installed.

I know... I am stabbing in the dark trying to solve these issues as they come up.

I then tried installing evdev by itself...

sudo python3.10 -m pip install evdev

But got an error that it couldn't find python.h, but I have all the headers installed, so I tried using dnf...

udo dnf install python-evdev

Which installed without failures...

Running transaction
  Preparing        :                                                                                                            1/1 
  Installing       : python3-evdev-1.6.0-2.fc37.x86_64                                                                          1/1 
  Running scriptlet: python3-evdev-1.6.0-2.fc37.x86_64                                                                          1/1 
  Verifying        : python3-evdev-1.6.0-2.fc37.x86_64                                                                          1/1 
Installed:
  python3-evdev-1.6.0-2.fc37.x86_64                                                                                                 

But the streamdeck install still fails on evdev saying it cannot find python.h

Failed to build evdev
Installing collected packages: evdev, tinycss2, streamdeck, six, shiboken2, pycparser, pillow, defusedxml, python-xlib, pyside2, cssselect2, cffi, pynput, cairocffi, CairoSVG, streamdeck-ui
  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
  ╰─> [30 lines of output]
      running install
      /usr/local/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
      ecodes.c already exists ... skipping build_ecodes
      building 'evdev._input' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/evdev
      gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.10 -c evdev/input.c -o build/temp.linux-x86_64-cpython-310/evdev/input.o -std=c99 -Wno-error=declaration-after-statement
      evdev/input.c:10:10: fatal error: Python.h: No such file or directory
         10 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
pblanton commented 1 year ago

I think I got past it by trying a step recommended by another user in one of the other bug reports here:

sudo dnf install python3-devel libusb1-devel libusbx-devel libudev-devel systemd-devel

This seems to have fixed the problems. When I run streamdeck from the terminal it launches now.

pblanton commented 1 year ago

Please add this step to the Fedora instructions...

sudo dnf install python3-devel libusb1-devel libusbx-devel libudev-devel systemd-devel