0

Was doing regular update via Ubuntu software got unmet dependency error for Python 3.5.

Tried apt-get upgrade got the error below.

What next?

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package python3.5 needs to be reinstalled, but I can't find an archive for it.

$ apt-cache policy python 3 python 3.5
python:
  Installed: 2.7.11-1
  Candidate: 2.7.11-1
  Version table:
 *** 2.7.11-1 100
        100 /var/lib/dpkg/status
python:
  Installed: 2.7.11-1
  Candidate: 2.7.11-1
  Version table:
 *** 2.7.11-1 100
        100 /var/lib/dpkg/status
python3.5-cups:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-reportlab-accel:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-venv:
  Installed: (none)
  Candidate: (none)
  Version table:
libpython3.5:
  Installed: 3.5.2-2ubuntu0~16.04.3
  Candidate: 3.5.2-2ubuntu0~16.04.3
  Version table:
 *** 3.5.2-2ubuntu0~16.04.3 100
        100 /var/lib/dpkg/status
python3.5:
  Installed: 3.5.2-2ubuntu0~16.04.1
  Candidate: 3.5.2-2ubuntu0~16.04.1
  Version table:
 *** 3.5.2-2ubuntu0~16.04.1 100
        100 /var/lib/dpkg/status
python3.5-minimal:
  Installed: 3.5.2-2ubuntu0~16.04.1
  Candidate: 3.5.2-2ubuntu0~16.04.1
  Version table:
 *** 3.5.2-2ubuntu0~16.04.1 100
        100 /var/lib/dpkg/status
python3.5-apt:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-renderpm:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-doc:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-dbus:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-lxml:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-gdbm:
  Installed: (none)
  Candidate: (none)
  Version table:
libpython3.5-stdlib:
  Installed: 3.5.2-2ubuntu0~16.04.1
  Candidate: 3.5.2-2ubuntu0~16.04.1
  Version table:
 *** 3.5.2-2ubuntu0~16.04.1 100
        100 /var/lib/dpkg/status
libreoffice-l10n-3.5:
  Installed: (none)
  Candidate: (none)
  Version table:
libpython3.5-minimal:
  Installed: 3.5.2-2ubuntu0~16.04.1
  Candidate: 3.5.2-2ubuntu0~16.04.1
  Version table:
 *** 3.5.2-2ubuntu0~16.04.1 100
        100 /var/lib/dpkg/status
libmwaw-0.3-3v5:
  Installed: (none)
  Candidate: (none)
  Version table:
povray-3.5:
  Installed: (none)
  Candidate: (none)
  Version table:
N: Unable to locate package 3
2
  • What Ubuntu version is it? please edit your question to include the output of command apt-cache policy python3 python3.5 – steeldriver Oct 2 '17 at 13:19
  • Ubuntu 16.04 LTS – Ciaran Doran Oct 2 '17 at 14:38
-1

Run

sudo dpkg --remove --force-all python3

then

sudo apt-get update
sudo apt-get install python3
5
  • 1
    I get the following error -The package python3.5 needs to be reinstalled, but I can't find an archive for it – Ciaran Doran Oct 2 '17 at 12:31
  • I've edit the answer, could you try it now? – Samer Abu Gahgah Oct 2 '17 at 12:42
  • Your suggestion worked, I then had to install Python 3.5, but all seems good now. Thanks! – Ciaran Doran Oct 2 '17 at 14:54
  • you are welcome. Can you vote the answer up please. – Samer Abu Gahgah Oct 2 '17 at 16:24
  • I'd like to but I'm too new! Thanks again. – Ciaran Doran Oct 3 '17 at 13:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.