In Ubuntu jammy, I ran apt install python3
and I got this problem:
Setting up python3-minimal (3.10.6-1~22.04.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' isolated = 0 environment = 1 user site = 1 import site = 1 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/python310.zip','/usr/lib/python3.10','/usr/lib/lib-dynload', ]Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encodingPython runtime state: core initializedModuleNotFoundError: No module named 'encodings'Current thread 0x0000007e0ee83420 (most recent call first):<no Python frame>dpkg: error processing package python3-minimal (--configure): installed python3-minimal package post-installation script subprocess returned error exit status 1Errors were encountered while processing: python3-minimalE: Sub-process /usr/bin/dpkg returned an error code (1)