Comment 11 for bug 1682934

Revision history for this message
Brian Kelly (betwixt) wrote : Re: [Bug 1682934] Re: package python3 3.5.1-4 failed to install/upgrade: pre-dependency problem - not installing python3

I too removed the references from /usr/local/lib and also from
/usr/local/bin and ran the 'sudo apt-get -f install' and it fixed
everything, including re-installing and configuring Python 3.5.

I suspect I caused the problem by manually installing Python to get
around the missing library problem I got when trying to run
'Transmageddon' so it points to a Python installer issue rather than
Ubuntu per se.

Interestingly if I type 'python' in a Terminal window it says I have
version 2.7.13 installed, even after the fix and update. Typing
'python3' says 3.5.3 is installed with a slightly earlier date than the
2.7 version.

Brian.

On 26/04/2017 00:31, Brian Murray wrote:
> I tested installing python3 using the instructions at
> https://passingcuriosity.com/2015/installing-python-from-source/ and
> sure enough I received the same Traceback.
>
> Setting up python3.5-minimal (3.5.3-1) ...
> Traceback (most recent call last):
> File "/usr/lib/python3.5/py_compile.py", line 6, in <module>
> import importlib._bootstrap_external
> File "/usr/lib/python3.5/importlib/__init__.py", line 57, in <module>
> import types
> File "/usr/lib/python3.5/types.py", line 166, in <module>
> import functools as _functools
> File "/usr/lib/python3.5/functools.py", line 23, in <module>
> from weakref import WeakKeyDictionary
> File "/usr/lib/python3.5/weakref.py", line 12, in <module>
> from _weakref import (
> ImportError: cannot import name '_remove_dead_weakref'
> 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 its a followup error from a previous failure.
> Errors were encountered while processing:
> python3.5-minimal
> python3-minimal
>
> Once I removed /usr/local/bin/python3.5 I was then able to fix the
> upgrade via 'sudo apt-get -f install'.
>