您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

安装dbus-python的简要教程

2024/12/30 21:32:30发布21次查看
写一个 python 脚本需要用到 dbus,但因为 dbus-python 这个包并没有提供 setup.py , 所以无法通过 pip 直接安装,唯有下载源码手动编译安装一途了。
wget https://pypi.python.org/packages/source/d/dbus-python/dbus-python-0.84.0.tar.gztar zxvf dbus-python-0.84.0.tar.gzcd dbus-python-0.84.0
但事有不顺,在 ./configure 的过程中,还是出了一些错。
configure: error: package requirements (dbus-1 >= 1.0) were not met:no package 'dbus-1' foundconsider adjusting the pkg_config_path environment variable if youinstalled software in a non-standard prefix.alternatively, you may set the environment variables dbus_cflagsand dbus_libs to avoid the need to call pkg-config.see the pkg-config man page for more details.
这显然是缺失了依赖库
sudo apt-get install libdbus-glib-1-dev
然后安装就就可以顺利进行了
./configuremakesudo make install
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product