安装dbus-python的简要教程,dbus-python
安装dbus-python的简要教程,dbus-python
写一个 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
相关内容
- 编写Python脚本批量配置VPN的教程,python脚本vpn教程
- 利用Python脚本在Nginx和uwsgi上部署MoinMoin的教程,uwsgim
- python中lambda与def用法对比实例分析,pythonlambda
- python排序方法实例分析,python排序实例分析
- python实现TCP服务器端与客户端的方法详解,pythontcp
- python获取当前日期和时间的方法,python获取当前日期
- Python的Urllib库的基本使用教程,pythonurllib
- python插入数据到列表的方法,python插入数据列表
- 介绍Python的Urllib库的一些高级用法,pythonurllib库
- 处理Python中的URLError异常的方法,pythonurlerror
评论关闭