python - 为什么无法安装python 3.4或python3?

标签 python installation dpkg

sudo apt-get install python3.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.4 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
3 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-minimal (3.4.2-2) ...
/var/lib/dpkg/info/python3-minimal.postinst: 5: /var/lib/dpkg/info/python3-minimal.postinst: py3compile: not found
dpkg: error processing package python3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.4.2-2); however:
  Package python3-minimal is not configured yet.

dpkg: error processing package python3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dh-python:
 dh-python depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package dh-python (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3-minimal
 python3
 dh-python
E: Sub-process /usr/bin/dpkg returned an error code (1)

安装sudo apt-get install python3时出现同样的错误。 我的包管理器出了什么问题,如何修复它并重新安装 python3.4?

enter image description here

enter image description here enter image description here

最佳答案

Package python3-minimal is not configured yet.

运行:

dpkg --configure -a

注意:如果使用非 root 帐户,请在命令前添加 sudo

重新配置所有已解压但未配置的包,然后:

apt-get -f install

纠正依赖关系已损坏的系统。

另请参阅:dpkg error: pycompile: not found

关于python - 为什么无法安装python 3.4或python3?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42156824/

相关文章:

python - 强制子类覆盖父类的方法

python - 如何使用 python2.7.14 在不覆盖 excel 文件中存在的先前数据的情况下使用不同的数据框更新相同的 excel 表?

python - 如何获取 django 模板来从两个不同的模型中提取信息?

installation - 如何在 Redhat Enterprise Linux 6.0 上安装 pysvn?

bash - 如何使用 curl 和 dpkg 在一行中获取和安装

python - 合并在 Pandas 中返回空数据框

python - Huggingface 变形金刚 Conda 安装问题

haskell - 安装 gtk2hs

docker - 在 Dockerfile 内执行 dpkg-reconfigurewireshark-common

macos - Mac 上 -dpkg 的替代品是什么?