marcnewlin / hi_my_name_is_keyboard

BSD 2-Clause "Simplified" License
647 stars 110 forks source link

ModuleNotFoundError: No module named 'dbus' #11

Open kiven7299 opened 9 months ago

kiven7299 commented 9 months ago

Hi there,

I have installed all the required dependencies as mentioned here. However, when I executed the python script "keystroke-injection-android-linux.py", it raised error:

Traceback (most recent call last):
  File "/mnt/d/Tools/hi_my_name_is_keyboard/./keystroke-injection-android-linux.py", line 11, in <module>
    from injector.agent import PairingAgent
  File "/mnt/d/Tools/hi_my_name_is_keyboard/injector/agent.py", line 1, in <module>
    import dbus
ModuleNotFoundError: No module named 'dbus'

I'm using kali wsl. It does have pydbus python package but not dbus. I have tried to install legacy dbus-python package but it failed to install. How to fix this problem? image

Thank you and have a great day!

cobra-c313 commented 8 months ago

Yeah, im having the same issue. After much digging, I have concluded that dbus-python is not working well with python3.10, we have to use a previous version to make it install successfully

kiven7299 commented 8 months ago

Thank you @cobra-c313, which version that you use?

Neowizard commented 5 months ago

You can install python3-dbus using apt. It should resolve your missing dependency issue