While upgrading to 17.04: package python3 3.5.1-4 failed to install/upgrade: pre-dependency problem - not installing python3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python3-defaults (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
I got this error while upgrading from 16.10 to 17.04, along with the same Python traceback as below. After a reboot, I seem to now be on 17.04.
I had just successfully upgraded from 16.04 to 16.10 with no problems.
When the error occurred, I was advised by a dialog to try the following command, which produced a very similar error, with traceback.
$ sudo apt-get install -f
[sudo] password for jhartley:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
account-
dns-root-data dnsmasq-base gdebi-core gir1.2-accounts-1.0 gir1.2-signon-1.0
hwdata imagemagick-common krb5-multidev libavcodec-
libavfilter-
libavutil-
libbonobo2-common libbonoboui2-0 libbonoboui2-common
libboost-
libboost-
libboost-
libcddb2 libchromaprint0 libdirectfb-1.2-9 libdvbpsi10 libebml4v5 libfwup0
libglade2-0 libglew1.13 libgnome-2-0 libgnome2-0 libgnome2-bin
libgnome2-common libgnomecanvas2-0 libgnomecanvas2
libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libgroupsock8
libgssrpc4 libiso9660-8 libjasper1 libjson-c3:i386 libjsoncpp1
libkadm5clnt-
libkdb5-8 liblircclient0 liblivemedia52 liblivemedia57 libllvm3.8
libllvm3.8:i386 liblouis10 libmatroska6v5 libmimic0 libmircommon6
libmirplatform13 libmirserver41 libonig2 libopencv-
libopencv-
liborbit-2-0 liborcus-0.11-0 libpam-cgfs libpay2 libperl5.22 libpoppler61
libpostproc-
libsidplay2v5 libswresample-
libubuntuonea
libvlc5 libvpx3 libwebp5 libx265-79 libx86-1 libxapian22v5
linux-
mir-platform-
mir-platform-
perl-modules-5.22 pm-utils qml-module-
qtdeclarative
ubuntu-
vlc-bin vlc-data vlc-nox vlc-plugin-base
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
python3
Suggested packages:
python3-doc python3-tk python3-venv
The following packages will be upgraded:
python3
1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
12 not fully installed or removed.
Need to get 0 B/8,696 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up python3.5-minimal (3.5.3-1) ...
Traceback (most recent call last):
File "/usr/lib/
import importlib.
File "/usr/lib/
import types
File "/usr/lib/
import functools as _functools
File "/usr/lib/
from weakref import WeakKeyDictionary
File "/usr/lib/
from _weakref import (
ImportError: cannot import name '_remove_
dpkg: error processing package python3.5-minimal (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
python3-minimal depends on python3.5-minimal (>= 3.5.3-1~); however:
Package python3.5-minimal is not configured yet.
dpkg: error processing package python3-minimal (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
python3.5-minimal
python3-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)
And, FWIW:
$ apt-cache policy python3-minimal
python3-minimal:
Installed: 3.5.3-1
Candidate: 3.5.3-1
Version table:
*** 3.5.3-1 500
500 http://
100 /var/lib/
ProblemType: Package
DistroRelease: Ubuntu 17.04
Package: python3 3.5.1-4
ProcVersionSign
Uname: Linux 4.10.0-19-generic x86_64
ApportVersion: 2.20.4-0ubuntu4
Architecture: amd64
Date: Thu Apr 13 22:18:17 2017
ErrorMessage: pre-dependency problem - not installing python3
InstallationDate: Installed on 2015-07-28 (626 days ago)
InstallationMedia: Ubuntu 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
RelatedPackageV
dpkg 1.18.10ubuntu2
apt 1.4
SourcePackage: python3-defaults
Title: package python3 3.5.1-4 failed to install/upgrade: pre-dependency problem - not installing python3
UpgradeStatus: Upgraded to zesty on 2017-04-14 (0 days ago)
Your dialog comments says it all:
***
The following packages will be upgraded:
python3
1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
12 not fully installed or removed.
******
That it; clean your system first: its easy via synaptic.
Does not forget to always purge the removed packages to avoid old settings left behind, which can seriously disturb the system.