如何在 macOS 上安装 dbus-python?

ale*_*Bai 7 python macos dbus

在第一步:配置时,出现以下错误:

... ... 
checking for DBUS... no
configure: error: Package requirements (dbus-1 >= 1.6) were not met:

No package 'dbus-1' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables DBUS_CFLAGS
and DBUS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Run Code Online (Sandbox Code Playgroud)

jmr*_*sal 5

OSX 抱怨它在系统中找不到 dbus。首先尝试通过执行以下操作来安装它:

brew install dbus
Run Code Online (Sandbox Code Playgroud)

然后,尝试dbus-python通过运行进行安装

pip install dbus-python
Run Code Online (Sandbox Code Playgroud)

为了运行 dbus 守护进程,请brew services start dbus按照文档中的说明进行操作。

  • 不适合我。错误是[此处](https://pastebin.com/TwLx8fXq) (4认同)