我计划安装dbus-python。
$ 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平台
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic运行pip install dbus-python时,它会报告错误:
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.检查
$ echo $PKG_CONFIG
#return nothing 我刚刚安装了pkg-config
$ pkg-config --version
0.29.1它仍然会报告错误
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
$ 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发布于 2019-09-13 14:57:59
我遇到了同样的问题
首先,我查找sudo apt-cache search dbus-1包
然后我使用以下命令安装了所需的软件包:sudo apt install libdbus-1-3 libdbus-1-dev
希望它能为你工作
发布于 2020-12-03 23:40:45
遇到了同样的问题。dbus-python似乎是一个被弃用的模块。dbus-next似乎是它的替代品。
pip install dbus-nexthttps://stackoverflow.com/questions/56123942
复制相似问题