【发布时间】:2020-01-19 11:09:01
【问题描述】:
我使用 Parrot OS v4.7,Pyinstaller 出现问题(依赖项问题,但所有依赖项都已完成/安装),所以我搜索并尝试卸载并重新安装 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 并取回已删除的软件包,以便计算机可以正常工作。
主要是删除了系统包。
【问题讨论】:
标签: python-3.x linux