欢迎来到山村网

安装dbus-python的简要教程

2019-03-02 12:24:24浏览:715 来源:山村网   
核心摘要:  这篇文章主要介绍了安装dbus-python的简要教程,dbus-python在Python编程中多用于处理进程之间的通信,需要的朋友可以参考下 

  这篇文章主要介绍了安装dbus-python的简要教程,dbus-python在Python编程中多用于处理进程之间的通信,需要的朋友可以参考下

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

  ?

1 2 3 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 的过程中,还是出了一些错。

  ?

1 2 3 4 5 6 7 8 9 10 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.

  这显然是缺失了依赖库

  ?

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

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

  ?

1 2 3 ./configure make sudo make install
(责任编辑:豆豆)
下一篇:

利用Python脚本在Nginx和uwsgi上部署MoinMoin的教程

上一篇:

使用SAE部署Python运行环境的教程

  • 信息二维码

    手机看新闻

  • 分享到
打赏
免责声明
• 
本文仅代表作者个人观点,本站未对其内容进行核实,请读者仅做参考,如若文中涉及有违公德、触犯法律的内容,一经发现,立即删除,作者需自行承担相应责任。涉及到版权或其他问题,请及时联系我们 xfptx@outlook.com