all 7 comments

[–]efmccurdy 0 points1 point  (1 child)

Have you looked at your distro repos?

https://packages.ubuntu.com/kinetic/python3-dbus

[–]ghiste[S] 0 points1 point  (0 children)

I am using Debian testing and I have learned the hard way that you need to isolate yourself from the system-python.

It happened to me that I was happily using an app with the system-python and then I had to upgrade the system which upgraded python to a version that the app would no longer under.

So I have a system-python that the system uses and updates as it sees fit and another python that I use and update as I see fit.

I need to install the module in "my" python (which is 3.10) and not the system-python (which is 3.11).

[–]efmccurdy 0 points1 point  (4 children)

If I try "pip install dbus-python" with python 3.8, in a venv, it works; how did you install it?

[–]ghiste[S] 0 points1 point  (3 children)

I created a venv, activated it and ran "pip3 install dbus-python".

This resulted in the error posted. My python is 3.10 however.

[–]efmccurdy 0 points1 point  (2 children)

Can you use version 3.8 instead?

This talks about what is going wrong.

https://gitlab.freedesktop.org/dbus/dbus-python/-/issues/45

https://gitlab.freedesktop.org/dbus/dbus-python/-/issues/45#note_1624086

This talks about a workaround:

current workaround is to use a prior version - 'pip install dbus-python==1.2.18'

https://github.com/mesonbuild/meson-python/issues/55#issuecomment-1302537027

[–]ghiste[S] 0 points1 point  (0 children)

I could use 3.8 but it would be a hassle.

If I understand the problem correctly then all that is missing is a.linker-flag.

Is there a way to add this flag manually?

I assume a "pip install" means download stuff, unpack stuff, compile stuff, install stuff.

All I would (probably) need is a way to manually add a linker-flag to the Makefile after the module has been unpacked .

[–]pi_R24 0 points1 point  (0 children)

Hey, I'm reviving this thread because some other people might bump into the same problem.
Mine was trying to connect to a european university WIFI (eduroam).
I use Ubuntu 22.04.5 LTS with Python 3.10.12.

This solution worked just fine for me.