手机
当前位置:查字典教程网 >脚本专栏 >python >安装dbus-python的简要教程
安装dbus-python的简要教程
摘要:写一个python脚本需要用到dbus,但因为dbus-python这个包并没有提供setup.py,所以无法通过pip直接安装,唯有下载源...

写一个 python 脚本需要用到 dbus,但因为 dbus-python 这个包并没有提供 setup.py , 所以无法通过 pip 直接安装,唯有下载源码手动编译安装一途了。

wget https://pypi.python.org/packages/source/d/dbus-python/dbus-python-0.84.0.tar.gz tar zxvf dbus-python-0.84.0.tar.gz cd dbus-python-0.84.0

但事有不顺,在 ./configure 的过程中,还是出了一些错。

configure: error: Package requirements (dbus-1 >= 1.0) 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.

这显然是缺失了依赖库

sudo apt-get install libdbus-glib-1-dev

然后安装就就可以顺利进行了

./configure make sudo make install

【安装dbus-python的简要教程】相关文章:

Python完全新手教程

python的id()函数解密过程

python基础教程之udp端口扫描

python实现图片批量剪切示例

python的id()函数介绍

实例讲解python函数式编程

Python语言的12个基础知识点小结

win7安装python生成随机数代码分享

python的常见命令注入威胁

python海龟绘图实例教程

精品推荐
分类导航