谁能告诉我哪个是窗口 7 32 位上 dbus python 的最佳库?我正在使用 Python 2.7。

我下载了 dbus-python 的最新 zip 并使用它,但它提供了许多导入错误,例如无法导入 dbus.exceptions 和没有名为 _dbus_bindings 的模块。

提前致谢。

最佳答案

我从 https://dl.dropbox.com/u/19049582/dbus.zip 下载的 zip 存档对我有用(最初链接自文章 http://poquitopicante.blogspot.it/2012/07/building-dbus-python-on-windows-with.html )

1)你创建一个名为“C:\dbus”的文件夹并复制里面的文件夹“bin”和“etc”

2)在环境变量“Path”中添加“C:\dbus\bin”

3)复制(合并)“C:\Python27\Lib”中的“lib\dbus-1.0”、“lib\pkgconfig”和“lib\site-packages”这3个文件夹

就这样。

关于python-2.7 - 适用于 Windows 的 Dbus-Python,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16056501/

10-15 11:36