启动系统配置打印机时出错

启动系统配置打印机时出错

我已经使用命令行安装了 EPSON 打印机驱动程序,但现在无法启动打印机配置。以下是回溯:

Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 29, in <module>
    import dbus
  File "/usr/lib/python3/dist-packages/dbus/__init__.py", line 77, in <module>
    import dbus.types as types
  File "/usr/lib/python3/dist-packages/dbus/types.py", line 6, in <module>
    from _dbus_bindings import (
ModuleNotFoundError: No module named '_dbus_bindings'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 29, in <module>
    import dbus
  File "/usr/lib/python3/dist-packages/dbus/__init__.py", line 77, in <module>
    import dbus.types as types
  File "/usr/lib/python3/dist-packages/dbus/types.py", line 6, in <module>
    from _dbus_bindings import (
ModuleNotFoundError: No module named '_dbus_bindings'

我用过

sudo apt-get install --reinstall software-center python-dbus
sudo apt-get install python3-dbus python3-dbus.mainloop.qt

但仍然出现错误。

答案1

我找到了问题所在。我安装了 python 3.6,并将 /usr/bin/python3 设置为它。将 /usr/bin/python3 改回 python 3.5 解决了这个问题。

sudo rm /usr/bin/python3

sudo ln -s python3.5 /usr/bin/python3

相关内容