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

Streamdeck won't start on CentOS 8 #295

Closed Parris-Aion closed 1 year ago

Parris-Aion commented 1 year ago

I followed the instructions for installing Streamdeck on CentOS. Had to play around with the version numbers to make it install everything - see command line below-.

pip3.8 install streamdeck==0.8.5 pynput==1.7.3 pyside2==5.15.1 python3-xlib==0.15 pillow==8.2.0 --user

pip3.8 install -i https://test.pypi.org/simple/ streamdeck-ui==1.0.7 --user

After installation, upon executing "streamdeck", I get the message below.

streamdeck

Traceback (most recent call last): File "/root/.local/bin/streamdeck", line 5, in File "/root/.local/lib/python3.8/site-packages/streamdeck_ui/gui.py", line 21, in File "/root/.local/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 146, in _import File "/root/.local/lib/python3.8/site-packages/streamdeck_ui/api.py", line 14, in File "/root/.local/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 146, in _import File "/root/.local/lib/python3.8/site-packages/StreamDeck/DeviceManager.py", line 13, in File "/root/.local/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 146, in _import File "/root/.local/lib/python3.8/site-packages/StreamDeck/Transport/LibUSBHIDAPI.py", line 9, in File "/root/.local/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 146, in _import File "/usr/local/lib/python3.8/ctypes/init.py", line 7, in File "/root/.local/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 146, in _import ModuleNotFoundError: No module named '_ctypes'

Operating system (please complete the following information)

Stream Deck Version

Thanks for any help!

dodgyrabbit commented 1 year ago

This error actually looks like a broken Python install. Since CentOS 8 does not ship with Python 3.8, you likely had to manually build it - and there are things that can go wrong.

From a clean CentOS Stream 8 image, was able to get it to work. Here are the steps:

Install hidapi

sudo yum -y install epel-release
sudo yum -y update
sudo yum install hidapi

Install python 3.8.9

sudo yum -y groupinstall "Development Tools"
sudo yum -y install openssl-devel bzip2-devel libffi-devel
wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
tar xvf Python-3.8.9.tgz 
cd Python-3.8.9/
./configure --enable-optimizations
sudo make altinstall

Install streamdeck-ui

pip3.8 install streamdeck-ui --user
PATH=$PATH:$HOME/.local/bin
sudo nano /etc/udev/rules.d/70-streamdeck.rules
sudo udevadm trigger
streamdeck
dodgyrabbit commented 1 year ago

Please review https://timothycrosley.github.io/streamdeck-ui/docs/installation/centos/ and try installing the latest version (2.0.13).