通过pip安装时出现Python Dbus错误

问题描述

python -m  pip install dbus-python
Collecting dbus-python
  Using cached dbus-python-1.2.16.tar.gz (576 kB)
Using legacy 'setup.py install' for dbus-python,since package 'wheel' is not installed.
Installing collected packages: dbus-python
    Running setup.py install for dbus-python ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\pure8\AppData\Local\Programs\Python\python38\python.exe' -u -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'C:\\Users\\pure8\\AppData\\Local\\Temp\\pip-install-zphzgd3p\\dbus-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\pure8\\AppData\\Local\\Temp\\pip-install-zphzgd3p\\dbus-python\\setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' install --record 'C:\Users\pure8\AppData\Local\Temp\pip-record-l_6vpx3k\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\pure8\AppData\Local\Programs\Python\python38\Include\dbus-python'
         cwd: C:\Users\pure8\AppData\Local\Temp\pip-install-zphzgd3p\dbus-python\
    Complete output (5 lines):
    running install
    running build
    creating C:\Users\pure8\AppData\Local\Temp\pip-install-zphzgd3p\dbus-python\build
    creating C:\Users\pure8\AppData\Local\Temp\pip-install-zphzgd3p\dbus-python\build\temp.win-amd64-3.8
    error: [WinError 193] %1 is not a valid Win32 application
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\pure8\AppData\Local\Programs\Python\python38\python.exe' -u -c 'import sys,'"'"'exec'"'"'))' install --record 'C:\Users\pure8\AppData\Local\Temp\pip-record-l_6vpx3k\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\pure8\AppData\Local\Programs\Python\python38\Include\dbus-python' Check the logs for full command output.

每次我尝试安装dbus时,都会给我一个错误,我尝试安装32位和64位的新python更新,并将它们添加到PATH中,但这无助于安装dbus。 notify2需要Dbus。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)