安装dbus-python的简要教程
作者:goldensun 时间:2021-09-07 10:09:43
写一个 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
0
投稿
猜你喜欢
Python模拟登录requests.Session应用详解
2023-08-04 08:40:38
使用python实现简单五子棋游戏
2022-09-22 04:16:35
asp使用 sql_dmo 添加新数据库代码
2010-03-17 20:57:00
Python使用scrapy采集时伪装成HTTP/1.1的方法
2023-07-07 01:28:40
详解pycharm的python包opencv(cv2)无代码提示问题的解决
2022-01-10 06:45:34
python中adb有什么功能
2022-06-22 13:25:15
Python字符串函数strip()原理及用法详解
2021-12-01 12:08:12
Python Scrapy图片爬取原理及代码实例
2022-04-29 05:51:06
python 三种方法提取pdf中的图片
2023-09-18 08:25:58
ASP去掉字符串头尾连续回车和空格的Function
2011-04-03 11:13:00
pytorch 模型可视化的例子
2023-06-13 08:24:34
使用AJAX的一个简单的例子
2007-09-21 17:55:00
Python使用re模块实现信息筛选的方法
2021-10-10 09:34:46
完全讲解 使用MSCS建立SQL Server集群
2009-01-19 14:10:00
RS.GETROWS使用详解
2008-01-16 13:21:00
Python 实现Numpy中找出array中最大值所对应的行和列
2021-08-11 06:55:35
Python绘制3d螺旋曲线图实例代码
2022-12-22 01:30:23
Python光学仿真理解Jones矩阵学习
2022-03-10 21:11:39
高考要来啦!用Python爬取历年高考数据并分析
2021-06-10 04:08:25
Python通过DOM和SAX方式解析XML的应用实例分享
2023-10-15 10:46:32