卸载python3后系统出现故障

时间:2020-01-19 11:09:01

标签: python-3.x linux

我使用Parrot OS v4.7,Pyinstaller出现了问题(依赖关系问题,但是所有依赖关系都已实现/安装),所以我用Google搜索并尝试卸载并重新安装Python3。

我跑了

apt-get remove python3

但它也开始删除其他软件包, 现在计算机无法正常运行。

它已删除:

  • 配合界面
  • 蓝鱼

屏幕截图不起作用,它说:

Failed to execute child process “mate-screenshot” (No   such file or directory))
  • 仪表板

  • 和许多其他软件包,系统无法像以前那样运行。

,现在当我尝试重新安装Python3以取回它们时,会发生错误。 运行

时,它提供以下输出

我跑步时

apt-get install python3

apt-get install --reinstall python3

我得到:

(Reading database ... 401001 files and directories currently installed.)
Preparing to unpack .../python3_3.7.5-3_amd64.deb ...
running python pre-rtupdate hooks for python3.7...
Unpacking python3 (3.7.5-3) over (3.7.5-3) ...
Setting up python3 (3.7.5-3) ...
running python rtupdate hooks for python3.7...
running python post-rtupdate hooks for python3.7...
Setting up python3-lib2to3 (3.8.0-1) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = '/usr/bin/python3.8'
  isolated = 0
  environment = 0
  user site = 1
  import site = 0
  sys._base_executable = '/usr/bin/python3.8'
  sys.base_prefix = '/usr'
  sys.base_exec_prefix = '/usr'
  sys.executable = '/usr/bin/python3.8'
  sys.prefix = '/usr'
  sys.exec_prefix = '/usr'
  sys.path = [
    '/usr/lib/python38.zip',
    '/usr/lib/python3.8',
    '/usr/lib/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f763db09740 (most recent call first):
<no Python frame>
dpkg: error processing package python3-lib2to3 (--configure):
 installed python3-lib2to3 package post-installation script subprocess returned 
error exit status 1
dpkg: dependency problems prevent configuration of python3-distutils:
 python3-distutils depends on python3-lib2to3 (>= 3.6.4); however:
  Package python3-lib2to3 is not configured yet.

dpkg: error processing package python3-distutils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-all:
 python3-all depends on python3-distutils (>= 3.7.5-1~); however:
  Package python3-distutils is not configured yet.

dpkg: error processing package python3-all (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-dev:
 python3-dev depends on python3-distutils (>= 3.7.5-1~); however:
  Package python3-distutils is not configured yet.

dpkg: error processing package python3-dev (--configure):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.0-2) ...
Errors were encountered while processing:
 python3-lib2to3
 python3-distutils
 python3-all
 python3-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)

请帮助我重新安装Python3并找回已删除的软件包,以便计算机可以正常运行。

大多数情况下,它删除了系统软件包。

1 个答案:

答案 0 :(得分:0)

在那里做了。除非您有能力从头开始构建Linux,否则您将无法使用它:)

重新安装是最快的方法。

相关问题