为了恢复,我尝试了,apt autoremove
尝试重新安装python3
,,使用和,尝试从中删除python文件。这些都不起作用。每次我都收到相同的消息:libpython3-stdlib
libpython3-minimal
apt
dpkg
/var/lib/dpkg/info
Setting up python3 (3.12.6-1) ...
running python rtupdate hooks for python3.12...
running python post-rtupdate hooks for python3.12...
Could not find platform independent libraries <prefix>
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = '/usr/bin/python3'
isolated = 0
environment = 1
user site = 1
safe_path = 0
import site = 1
is in build tree = 0
stdlib dir = '/usr/lib/python3.12'
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/usr'
sys.base_exec_prefix = '/usr'
sys.platlibdir = 'lib'
sys.executable = '/usr/bin/python3'
sys.prefix = '/usr'
sys.exec_prefix = '/usr'
sys.path = [
'/usr/lib/python312.zip',
'/usr/lib/python3.12',
'/usr/lib/python3.12/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fcbf087c080 (most recent call first):
<no Python frame>
dpkg: error processing package python3 (--configure):
installed python3 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
python3
E: Sub-process /usr/bin/dpkg returned an error code (1)
操作系统:kali-rolling