首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >pip无法安装dbus-python

pip无法安装dbus-python
EN

Stack Overflow用户
提问于 2019-05-14 14:06:04
回答 2查看 4.6K关注 0票数 3

我计划安装dbus-python。

代码语言:javascript
复制
$ pip --version; python --version
pip 19.0.3 from /home/me/anaconda3/lib/python3.7/site-packages/pip (python 3.7)   
Python 3.7.3

平台

代码语言:javascript
复制
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.10
Release:    18.10
Codename:   cosmic

运行pip install dbus-python时,它会报告错误:

代码语言:javascript
复制
  checking for DBUS... no
  configure: error: in `/tmp/pip-install-hr9djbwg/dbus-python/build/temp.linux-x86_64-3.7':
  configure: error: The pkg-config script could not be found or is too old.  Make sure it
  is in your PATH or set the PKG_CONFIG environment variable to the full
  path to pkg-config.

  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.

检查

代码语言:javascript
复制
$ echo $PKG_CONFIG
#return nothing 

我刚刚安装了pkg-config

代码语言:javascript
复制
$ pkg-config --version
0.29.1

它仍然会报告错误

代码语言:javascript
复制
  checking for DBUS... no
  configure: error: Package requirements (dbus-1 >= 1.8) 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.

但是,不能安装dbus-1

代码语言:javascript
复制
$ pip install dbus-1
Collecting dbus-1
  Could not find a version that satisfies the requirement dbus-1 (from versions: )
No matching distribution found for dbus-1
EN

回答 2

Stack Overflow用户

发布于 2019-09-13 14:57:59

我遇到了同样的问题

首先,我查找sudo apt-cache search dbus-1

然后我使用以下命令安装了所需的软件包:sudo apt install libdbus-1-3 libdbus-1-dev

希望它能为你工作

票数 3
EN

Stack Overflow用户

发布于 2020-12-03 23:40:45

遇到了同样的问题。dbus-python似乎是一个被弃用的模块。dbus-next似乎是它的替代品。

代码语言:javascript
复制
pip install dbus-next
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56123942

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档