首页 > 解决方案 > 如何修复此 dbus 安装错误?

问题描述

当我尝试安装 dbus-python 时:

点安装 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\nana kwamw\python\python37-32\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\NANAKW~1\\AppData\\Local\\Temp\\pip-install-lrjk_2mv\\dbus-python_30409fee025f4702bea7d5058bcbd6da\\setup.py'"'"'; __file__='"'"'C:\\Users\\NANAKW~1\\AppData\\Local\\Temp\\pip-install-lrjk_2mv\\dbus-python_30409fee025f4702bea7d5058bcbd6da\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\NANAKW~1\AppData\Local\Temp\pip-record-e6kyrt23\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\nana kwamw\python\python37-32\Include\dbus-python'
         cwd: C:\Users\NANAKW~1\AppData\Local\Temp\pip-install-lrjk_2mv\dbus-python_30409fee025f4702bea7d5058bcbd6da\
    Complete output (5 lines):
    running install
    running build
    creating C:\Users\NANAKW~1\AppData\Local\Temp\pip-install-lrjk_2mv\dbus-python_30409fee025f4702bea7d5058bcbd6da\build
    creating C:\Users\NANAKW~1\AppData\Local\Temp\pip-install-lrjk_2mv\dbus-python_30409fee025f4702bea7d5058bcbd6da\build\temp.win32-3.7
    error: [WinError 193] %1 is not a valid Win32 application
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\nana kwamw\python\python37-32\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\NANAKW~1\\AppData\\Local\\Temp\\pip-install-lrjk_2mv\\dbus-python_30409fee025f4702bea7d5058bcbd6da\\setup.py'"'"'; __file__='"'"'C:\\Users\\NANAKW~1\\AppData\\Local\\Temp\\pip-install-lrjk_2mv\\dbus-python_30409fee025f4702bea7d5058bcbd6da\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\NANAKW~1\AppData\Local\Temp\pip-record-e6kyrt23\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\nana kwamw\python\python37-32\Include\dbus-python' Check the logs for full command output.

有人可以解释错误以及如何解决吗?

标签: pythoninstallationpipdbusnotify

解决方案


推荐阅读