I have installed anaconda4 on my ubuntu and I have these modules on my Python:
dbus-python (1.2.4)
gi (1.2)
pydbus (0.2)
QtAwesome (0.3.2)
qtconsole (4.2.0)
QtPy (1.0)
sip (4.18)
I tried installing dbus-python (1.2.4) and pydbus (0.2), however, neither of them works!
After testing a simple program in python 3.5.1, an error appeared:
import dbus
system_bus = dbus.SystemBus()
ImportError: No module named 'dbus'
When I use pydbus in Python 2.7.11 and 3.5.1:
from pydbus import SystemBus
bus = SystemBus()
systemd = bus.get(".systemd1")
for unit in systemd.ListUnits():
print(unit)
I get this error:
ImportError: No module named repository
The only thing that works is this example with PyQT4 which I don't have any tutorial for.
What is the problem? Is it my installation or something else?
I'm not sure how you installed the modules but this error most likely occurs because the module is not installed or not installed correctly. I would recommend the following for installing a module.
pip install dbusor since you have anaconda this will also work
conda install dbusIf you are able to access and download the source code for instance on GitHub you can try the following two methods. Navigate to the source code directory then run the following commands in the terminal:
or
For more on installing packages from source distributions see this page.