Python无法安装dbus包

问题描述 投票:0回答:1

我尝试了很多方法,但无法安装 python3 的 dbus 包。

我相信这个命令为 python3 安装 dbus:

sudo apt-get install python3-dbus-dbg

但是我仍然收到此错误:

>>> import dbus
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'dbus'
python python-3.x python-module
1个回答
0
投票

如果您使用 PyCharm,您可以按照以下步骤进行操作:

文件 -> 设置 -> Python 解释器 -> + -> dbus-python -> 安装包

picture with steps

起初我尝试用

pip install dbus-python
安装它,但它对我不起作用。

© www.soinside.com 2019 - 2024. All rights reserved.