Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'python3-xlib==0.*,>=0.15.0' distribution was not found and is required by streamdeck-ui #212

Closed
dhtseany opened this issue Mar 9, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@dhtseany
Copy link

dhtseany commented Mar 9, 2022

Describe the bug
I'm the new streamdeck-ui package maintainer for Arch Linux and I'm working on upgrading us from 1.1.3 to 2.0.3. I'm catching a problem where the app is complaining that python3-xlib wasn't of sufficient version value even thought I presently have python-xlib-0.31-3, which I believe to be of sufficient version compatibility.

To Reproduce
Steps to reproduce the behavior:
Launch streamdeck from the terminal on a current Arch Linux system. You'll need an updated PKGBUILD to truly install and test it, which I can provide upon request.

Expected behavior
The app to launch without error.

Screenshots
python-xlib-problem

Operating system (please complete the following information)

  • OS: Arch Linux [Current to 07MAR2022]
  • Desktop environment: Gnome 3
  • Python version: Latest, Python 3.10

Stream Deck Version

  • XL
@dhtseany dhtseany added the bug Something isn't working label Mar 9, 2022
@dodgyrabbit
Copy link
Collaborator

Hi @dhtseany - thanks for reporting this issue. I had a look and it seems like the root cause is that streamdeck_ui has a dependency on python3-xlib, which is considered a different package from python-xlib.

There are two options:

  1. You include python3-xlib
  2. I change streamdeck_ui to use python-xlib (my preference)

It seems to me that python3-xlib is abandoned and was originally created around 2014 as an attempt to support new language features. Since then, Python 3+ support has been added to python-xlib. My feeling is that the correct solution is to change the dependency to python-xlib. I did some very basic testing and it seems OK to me. FYI This library is required because of pynput.

I'll have to publish a new build with the updated dependency.

@dhtseany
Copy link
Author

Thank you for your helpful reply, it's much appreciated!

I've been looking around Arch's repos, both AUR and the regular package repos, to see what options I have for sourcing python3-xlib and while we still have python2-xlib it seems, as you've also seen, that the python3-xlib upstream was left behind and the Arch maintainers stopped supporting it in favor of python-xlib.

How much effort do you think it'd take to update the dependency to python-xlib? I'm pretty sure most package maintainers will be cool with the update since most of the other major distros all seem to have python-xlib available now.

@Steffen-Samseth
Copy link

Anything us poor Arch users can do to work around this while a fix is in the works?

@Cinux90
Copy link

Cinux90 commented Mar 23, 2022

@AceofCookies
I have the same problem as you, additionally no deep knowledge regarding the Python structure in the OS, therefore no guarantee that it works error free.
But with the following commands I was able to start the software.

# copy python_xlib directory in into the same parent folder with different name (python3_xlib...)
cp -r /usr/lib/python3.10/site-packages/python_xlib-0.31-py3.10.egg-info /usr/lib/python3.10/site-packages/python3_xlib-0.31-py3.10.egg-info
# change the, i hope so, package name from python-xlib to python3-xlib
sed -i 's/Name: python-xlib/Name: python3-xlib/' /usr/lib/python3.10/site-packages/python3_xlib-0.31-py3.10.egg-info/PKG-INF

Tested with:

Manjaro Linux
Release:	21.2.5
Codename: Qonos

@Cinux90
Copy link

Cinux90 commented Mar 23, 2022

@dhtseany
Not sure if this can be part of the PKGBUILD as post task I'm not familiar with the PKGBUILD. But this would be a workaround for now.

@stepfister
Copy link

Hi @Cinux90 ,

I'm using the actual linux manjaro, updated for 2 days. I have the same problem with "python3-xlib". I tried your workaround, but it doesn't work. But I don't really understand what do you do with your workaround.

1.) with the cp -r line you make a directory branch in your home folder?
2.) with the sed line you make what? Do you change one line in /usr/lib/python3.10/site-packages/python3_xlib-0.31-py3.10.egg-info/PKG-INF ?

If I paste your lines in my terminal: The sed command didn't work. Error: Directory not found.

Maybe you can explain your fix a little bit more in detail for a noob like me?

Thanks,
Stefan

@stepfister
Copy link

stepfister commented Mar 24, 2022

@dodgyrabbit How can I include python3-xlib on Linux Manjaro in the meantime until the new build comes out with the fix? Thanks for your good work. Would it be enough to install the missing library?

update: I tried the following commands:

# pip install python3-xlib

and

# pip install pynput

It seems to work for Linux Manjaro, Streamdeck is starting and accepting configuration.

DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=21.2.5
DISTRIB_CODENAME=Qonos
DISTRIB_DESCRIPTION="Manjaro Linux"

@Cinux90
Copy link

Cinux90 commented Mar 24, 2022

@stepfister
Indeed there is a typo

# copy python_xlib directory in into the same parent folder with different name (python3_xlib...)
cp -r /usr/lib/python3.10/site-packages/python_xlib-0.31-py3.10.egg-info /usr/lib/python3.10/site-packages/python3_xlib-0.31-py3.10.egg-info
# change the, i hope so, package name from python-xlib to python3-xlib
sed -i 's/Name: python-xlib/Name: python3-xlib/' /usr/lib/python3.10/site-packages/python3_xlib-0.31-py3.10.egg-info/PKG-INF

If you do that as normal user you need to add a sudo in front of the cp and sed command

PS: I updated my initial comment too.

@dodgyrabbit
Copy link
Collaborator

I've committed the change to remove the python3-xlib dependency. However, I need to test this with a couple of clean installs to make sure it works properly. I also want to test some upgrade scenarios. Will keep you posted.

@dhtseany
Copy link
Author

Thank you for your efforts and the update you have provided, Pieter! I have at least 2 systems sitting on the previous version that are waiting to be updated and I'm happy to lend a hand with upgrade testing if you wish. Thanks, Sean

@dodgyrabbit

This comment was marked as outdated.

@dodgyrabbit
Copy link
Collaborator

Version 2.0.4 has been published which does not depend on python3-xlib. Let me know if you have any success now to create the streamdeck-ui package on Arch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants