Python 3.x 卸载python3后系统出现故障
我使用Parrot OS v4.7,Pyinstaller出现问题(依赖项问题,但所有依赖项都已满足/安装),因此我在谷歌上搜索并尝试卸载和重新安装Python3 我跑 但它也开始删除其他软件包, 现在电脑不能正常工作了 它删除了:Python 3.x 卸载python3后系统出现故障,python-3.x,linux,Python 3.x,Linux,我使用Parrot OS v4.7,Pyinstaller出现问题(依赖项问题,但所有依赖项都已满足/安装),因此我在谷歌上搜索并尝试卸载和重新安装Python3 我跑 但它也开始删除其他软件包, 现在电脑不能正常工作了 它删除了: 配合界面 蓝鱼 屏幕截图不起作用,它说: Failed to execute child process “mate-screenshot” (No such file or directory)) 仪表板 和其他许多软件包一样,该系统的功能与以前不同
- 配合界面
- 蓝鱼
Failed to execute child process “mate-screenshot” (No such file or directory))
- 仪表板
- 和其他许多软件包一样,该系统的功能与以前不同
apt-get install 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)
(正在读取数据库…401001个当前安装的文件和目录。)
正在准备拆包…/python3_3.7.5-3_amd64.deb。。。
正在为python3.7运行python预rtupdate挂钩。。。
将蟒蛇3(3.7.5-3)从(3.7.5-3)上拆下。。。
正在设置python3(3.7.5-3)。。。
正在为python3.7运行python rtupdate挂钩。。。
正在为python3.7运行python post rtupdate挂钩。。。
正在设置python3-lib2to3(3.8.0-1)。。。
找不到与平台无关的库
找不到与平台相关的库
考虑将$PythONHOLD设置为[:]
Python路径配置:
PYTHONHOME=(未设置)
PYTHONPATH=(未设置)
程序名='/usr/bin/python3.8'
隔离=0
环境=0
用户站点=1
导入站点=0
sys._base_executable='/usr/bin/python3.8'
sys.base_前缀='/usr'
sys.base_exec_prefix='/usr'
sys.executable='/usr/bin/python3.8'
sys.prefix='/usr'
sys.exec_前缀='/usr'
sys.path=[
“/usr/lib/python38.zip”,
“/usr/lib/python3.8”,
“/usr/lib/lib dynload”,
]
致命的Python错误:init_fs_encoding:无法获取文件的Python编解码器
系统编码
Python运行时状态:核心已初始化
ModuleNotFoundError:没有名为“encodings”的模块
当前线程0x00007f763db09740(最新调用优先):
dpkg:处理包python3-lib2to3(--configure)时出错:
已安装的python3-lib2to3包安装后脚本子进程返回
错误退出状态1
dpkg:依赖关系问题阻止配置python3 distutils:
python3 distutils取决于python3-lib2to3(>=3.6.4);然而:
尚未配置包python3-lib2to3。
dpkg:处理包python3 distutils时出错(--configure):
依赖关系问题-保持未配置状态
dpkg:依赖关系问题阻止配置python3 all:
蟒蛇3都依赖于蟒蛇3区(>=3.7.5-1~);然而:
尚未配置包python3 distutils。
dpkg:处理包python3 all(--configure)时出错:
依赖关系问题-保持未配置状态
dpkg:依赖关系问题阻止配置python3开发人员:
python3-dev依赖于python3-distutils(>=3.7.5-1~);然而:
尚未配置包python3 distutils。
dpkg:处理包python3 dev(--configure)时出错:
依赖关系问题-保持未配置状态
处理man db(2.9.0-2)的触发器。。。
处理时遇到错误:
python3-lib2to3
蟒蛇3区
蟒蛇3号
蟒蛇3开发
E:子流程/usr/bin/dpkg返回错误代码(1)
请帮助我重新安装Python3并取回已删除的软件包,以便计算机可以正常工作
大多数情况下,它删除了系统包。已经完成了。除非您能够从头开始构建linux,否则无法让它正常工作:)
重新安装是最快的方法 我有相同操作系统的可引导USB,所以有可能从那里加载损坏或丢失的软件包吗。。。?我认为从头开始构建linux没有那么容易…@CHD不,不要重建。简单地
apt get install mate interface
和其他相关软件包,他们将重新安装python3。你必须和python一起生活。。。
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)