E: 安装空闲时子进程 /usr/bin/dpkg 返回错误代码 (1)

E: 安装空闲时子进程 /usr/bin/dpkg 返回错误代码 (1)

我尝试使用这个命令来安装 IDLE:

sudo apt-get install idle3

但在安装时出现此错误:

错误的完整形状如下:

Setting up idle-python3.5 (3.5.3-1) ...
Traceback (most recent call last):
  File "/usr/lib/python3.5/compileall.py", line 15, in <module>
    import importlib.util
  File "/usr/lib/python3.5/importlib/__init__.py", line 57, in <module>
    import types
  File "/usr/lib/python3.5/types.py", line 166, in <module>
    import functools as _functools
  File "/usr/lib/python3.5/functools.py", line 23, in <module>
    from weakref import WeakKeyDictionary
  File "/usr/lib/python3.5/weakref.py", line 12, in <module>
    from _weakref import (
ImportError: cannot import name '_remove_dead_weakref'
dpkg: error processing package idle-python3.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of idle3:
 idle3 depends on idle-python3.5; however:
  Package idle-python3.5 is not configured yet.

dpkg: error processing package idle3 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 idle-python3.5
 idle3
E: Sub-process /usr/bin/dpkg returned an error code (1)

谢谢你帮我解决这个问题

相关内容