我意外地从 ubuntu 中删除了 python3,现在我的终端无法打开。我尝试使用更新sudo apt-get update
,这是我收到的错误。我尝试了网上所有相关的解决方案,但似乎都不起作用。有人能帮我吗?仅供参考,我仍然安装了 python 2.7.12
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
9 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3-dateutil (2.4.2-1) ...
/var/lib/dpkg/info/python3-dateutil.postinst: 6:
/var/lib/dpkg/info/python3-dateutil.postinst: py3compile: not found
dpkg: error processing package python3-dateutil (--configure):
subprocess installed post-installation script returned error exit
status 127
Setting up python3-roman (2.0.0-2) ...
/var/lib/dpkg/info/python3-roman.postinst: 6:
/var/lib/dpkg/info/python3-roman.postinst: py3compile: not found
dpkg: error processing package python3-roman (--configure):
subprocess installed post-installation script returned error exit
status 127
dpkg: dependency problems prevent configuration of python3-docutils:
python3-docutils depends on python3-roman; however:
Package python3-roman is not configured yet.
dpkg: error processing package python3-docutils (--configure):
dependency problems - leaving unconfigured
Setting up python3-jmespath (0.9.0-2) ...
No apport report written because the error message indicates its a
followup error from a previous failure.
/var/lib/dpkg/info/python3-jmespath.postinst: 6:
/var/lib/dpkg/info/python3-jmespath.postinst: py3compile: not found
dpkg: error processing package python3-jmespath (--configure):
subprocess installed post-installation script returned error exit
status 127
No apport report written because MaxReports is reached already
dpkg:
dependency problems prevent configuration of python3-botocore:
python3-botocore depends on python3-dateutil; however:
Package python3-dateutil is not configured yet.
python3-botocore depends on python3-docutils; however:
Package python3-docutils is not configured yet.
python3-botocore depends on python3-jmespath; however:
Package python3-jmespath is not configured yet.
dpkg: error processing package python3-botocore (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Setting up
python3-colorama (0.3.7-1) ...
/var/lib/dpkg/info/python3-colorama.postinst: 6:
/var/lib/dpkg/info/python3-colorama.postinst: py3compile: not found
dpkg: error processing package python3-colorama (--configure):
subprocess installed post-installation script returned error exit
status 127
No apport report written because MaxReports is reached already
Setting up
python3-pygments (2.1+dfsg-1) ...
/var/lib/dpkg/info/python3-pygments.postinst: 6:
/var/lib/dpkg/info/python3-pygments.postinst: py3compile: not found
dpkg: error processing package python3-pygments (--configure):
subprocess installed post-installation script returned error exit
status 127
No apport report written because MaxReports is reached already
Setting up
python3-rsa (3.2.3-1.1) ...
/var/lib/dpkg/info/python3-rsa.postinst: 6: /var/lib/dpkg/info/python3-rsa.postinst: py3compile: not found
dpkg: error processing package python3-rsa (--configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python3-s3transfer:
python3-s3transfer depends on python3-botocore; however:
Package python3-botocore is not configured yet.
dpkg: error processing package python3-s3transfer (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
python3-dateutil
python3-roman
python3-docutils
python3-jmespath
python3-botocore
python3-colorama
python3-pygments
python3-rsa
python3-s3transfer
E: Sub-process /usr/bin/dpkg returned an error code (1)
dev (lifecycle-management) lambdas $ sudo apt-get --reinstall install python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reinstallation of python3 is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
9 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python3-dateutil (2.4.2-1) ...
/var/lib/dpkg/info/python3-dateutil.postinst: 6: /var/lib/dpkg/info/python3-dateutil.postinst: py3compile: not found
dpkg: error processing package python3-dateutil (--configure):
subprocess installed post-installation script returned error exit status 127
Setting up python3-roman (2.0.0-2) ...
/var/lib/dpkg/info/python3-roman.postinst: 6: /var/lib/dpkg/info/python3-roman.postinst: py3compile: not found
dpkg: error processing package python3-roman (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of python3-docutils:
python3-docutils depends on python3-roman; however:
Package python3-roman is not configured yet.
dpkg: error processing package python3-docutils (--configure):
dependency problems - leaving unconfigured
Setting up python3-jmespath (0.9.0-2) ...
No apport report written because the error message indicates its a followup error from a previous failure.
/var/lib/dpkg/info/python3-jmespath.postinst: 6: /var/lib/dpkg/info/python3-jmespath.postinst: py3compile: not found
dpkg: error processing package python3-jmespath (--configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python3-botocore:
python3-botocore depends on python3-dateutil; however:
Package python3-dateutil is not configured yet.
python3-botocore depends on python3-docutils; however:
Package python3-docutils is not configured yet.
python3-botocore depends on python3-jmespath; however:
Package python3-jmespath is not configured yet.
dpkg: error processing package python3-botocore (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Setting up python3-colorama (0.3.7-1) ...
/var/lib/dpkg/info/python3-colorama.postinst: 6: /var/lib/dpkg/info/python3-colorama.postinst: py3compile: not found
dpkg: error processing package python3-colorama (--configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
Setting up python3-pygments (2.1+dfsg-1) ...
/var/lib/dpkg/info/python3-pygments.postinst: 6: /var/lib/dpkg/info/python3-pygments.postinst: py3compile: not found
dpkg: error processing package python3-pygments (--configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
Setting up python3-rsa (3.2.3-1.1) ...
/var/lib/dpkg/info/python3-rsa.postinst: 6: /var/lib/dpkg/info/python3-rsa.postinst: py3compile: not found
dpkg: error processing package python3-rsa (--configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python3-s3transfer:
python3-s3transfer depends on python3-botocore; however:
Package python3-botocore is not configured yet.