Unmet dependencies error [duplicate]

So some unmet dependencies are there and I cant install anything without getting rid of them.

When i type in:

sudo apt-get install -f

I get this:

patrick@patrick-Z97N-WIFI:~$  sudo apt-get install -f
[sudo] password for patrick: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 aptitude:i386 : Depends: libapt-pkg4.12:i386 (>= 0.8.16~exp12ubuntu6) but it is not installed
                 Depends: libboost-iostreams1.46.1:i386 (>= 1.46.1-1) but it is not installable
                 Depends: libc6:i386 (>= 2.4) but it is not installed
                 Depends: libcwidget3:i386 but it is not installed
                 Depends: libept1.4.12:i386 but it is not installed
                 Depends: libgcc1:i386 (>= 1:4.1.1) but it is not installed
                 Depends: libncursesw5:i386 (>= 5.6+20070908) but it is not installed
                 Depends: libsigc++-2.0-0c2a:i386 (>= 2.0.2) but it is not installed
                 Depends: libsqlite3-0:i386 (>= 3.6.5) but it is not installed
                 Depends: libstdc++6:i386 (>= 4.6) but it is not installed
                 Depends: libtinfo5:i386 but it is not installed
                 Depends: libxapian22:i386 but it is not installed
                 Recommends: apt-xapian-index:i386 but it is not installable
                 Recommends: libparse-debianchangelog-perl:i386 but it is not installable
 duplicity : Depends: python:any (>= 2.7.1-0ubuntu2)
 gconf2 : Depends: python:any
 gir1.2-ibus-1.0 : Depends: python:any (>= 2.7.5-5~)
                   Depends: python:any (< 2.8)
 hplip-data : Depends: python:any (>= 2.7)
 ibus-pinyin : Depends: python:any (>= 2.6.6-7~)
 ibus-table : Depends: python:any (>= 2.7.1-0ubuntu2)
 landscape-client-ui-install : Depends: python:any
 ppa-purge : Depends: aptitude
 python-cairo : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-characteristic : Depends: python:any (>= 2.7.5-5~)
                         Depends: python:any (< 2.8)
 python-chardet : Depends: python:any (>= 2.7.5-5~)
                  Depends: python:any (< 2.8)
 python-crypto : Depends: python:any (>= 2.7.5-5~)
 python-dbus : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-debian : Depends: python:any (< 2.8)
                 Depends: python:any (>= 2.7.5-5~)
 python-debtagshw : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-defer : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-gobject-2 : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-gtk2 : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-httplib2 : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-idna : Depends: python:any (>= 2.7.5-5~)
               Depends: python:any (< 2.8)
 python-imaging : Depends: python:any (>= 2.7.5-5~)
                  Depends: python:any (< 2.8)
 python-lockfile : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-notify : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-oauthlib : Depends: python:any (>= 2.7.5-5~)
                   Depends: python:any (< 2.8)
 python-oneconf : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-openssl : Depends: python:any (>= 2.7.5-5~)
 python-pexpect : Depends: python:any (>= 2.7.5-5~)
                  Depends: python:any (< 2.8)
 python-pil : Depends: python:any (>= 2.7.5-5~)
 python-piston-mini-client : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-pkg-resources : Depends: python:any (>= 2.7)
                        Depends: python:any (< 2.8)
 python-pyasn1 : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-pyasn1-modules : Depends: python:any (>= 2.7.5-5~)
                         Depends: python:any (< 2.8)
 python-reportlab : Depends: python:any (< 2.8)
                    Depends: python:any (>= 2.7.5-5~)
 python-serial : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-service-identity : Depends: python:any (>= 2.7.5-5~)
                           Depends: python:any (< 2.8)
 python-six : Depends: python:any (>= 2.7.5-5~)
              Depends: python:any (< 2.8)
 python-xdg : Depends: python:any (>= 2.7.1-0ubuntu2)
 python-zope.interface : Depends: python:any (>= 2.7.5-5~)
 sessioninstaller : Depends: python:any (>= 2.7.1-0ubuntu2)
 software-center : Depends: python:any (>= 2.7.1-0ubuntu2)
 software-center-aptdaemon-plugins : Depends: python:any (>= 2.7.1-0ubuntu2)
 totem : Depends: python:any (>= 2.6.6-7~)
 totem-plugins : Depends: python:any (>= 2.6.6-7~)
 ubuntu-system-service : Depends: python:any (>= 2.7.1-0ubuntu2)
 unity : Depends: python:any
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
patrick@patrick-Z97N-WIFI:~$

I attempted to install python today.

EDIT: I tried to convert a python pakage (tgz) into deb and install it. I downloaded it from the official website. I wasn't aware that it was already preinstalled (<--- newbie here)

In sources.list it says


 deb cdrom:[Ubuntu 14.10 _Utopic Unicorn_ - Release amd64 (20141022.1)]/ utopic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cz.archive.ubuntu.com/ubuntu/ utopic main restricted
deb-src http://cz.archive.ubuntu.com/ubuntu/ utopic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cz.archive.ubuntu.com/ubuntu/ utopic-updates main restricted
deb-src http://cz.archive.ubuntu.com/ubuntu/ utopic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cz.archive.ubuntu.com/ubuntu/ utopic universe
deb-src http://cz.archive.ubuntu.com/ubuntu/ utopic universe
deb http://cz.archive.ubuntu.com/ubuntu/ utopic-updates universe
deb-src http://cz.archive.ubuntu.com/ubuntu/ utopic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cz.archive.ubuntu.com/ubuntu/ utopic multiverse
deb-src http://cz.archive.ubuntu.com/ubuntu/ utopic multiverse
deb http://cz.archive.ubuntu.com/ubuntu/ utopic-updates multiverse
deb-src http://cz.archive.ubuntu.com/ubuntu/ utopic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cz.archive.ubuntu.com/ubuntu/ utopic-backports main restricted universe multiverse
deb-src http://cz.archive.ubuntu.com/ubuntu/ utopic-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu utopic-security main restricted
deb-src http://security.ubuntu.com/ubuntu utopic-security main restricted
deb http://security.ubuntu.com/ubuntu utopic-security universe
deb-src http://security.ubuntu.com/ubuntu utopic-security universe
deb http://security.ubuntu.com/ubuntu utopic-security multiverse
deb-src http://security.ubuntu.com/ubuntu utopic-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu utopic partner
# deb-src http://archive.canonical.com/ubuntu utopic partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu utopic main
deb-src http://extras.ubuntu.com/ubuntu utopic main

and about the tail -25 /var/log/dpkg.log:

root@patrick-Z97N-WIFI:~# tail -25 /var/log/dpkg.log
2015-04-22 20:06:50 configure python:amd64 2.7.9-2 2.7.9-2
2015-04-22 20:06:50 status unpacked python:amd64 2.7.9-2
2015-04-22 20:06:50 status half-configured python:amd64 2.7.9-2
2015-04-22 20:06:50 status installed python:amd64 2.7.9-2
2015-04-22 20:06:50 trigproc man-db:amd64 2.7.0.2-2 
2015-04-22 20:06:50 status half-configured man-db:amd64 2.7.0.2-2
2015-04-22 20:06:50 status installed man-db:amd64 2.7.0.2-2
2015-04-22 20:06:50 trigproc doc-base:all 0.10.6 
2015-04-22 20:06:50 status half-configured doc-base:all 0.10.6
2015-04-22 20:06:50 status installed doc-base:all 0.10.6
2015-04-22 20:27:10 startup packages configure
2015-04-22 20:32:31 startup archives install
2015-04-22 20:32:32 install aptitude:i386  0.6.6-1ubuntu1
2015-04-22 20:32:32 status half-installed aptitude:i386 0.6.6-1ubuntu1
2015-04-22 20:32:32 status triggers-pending man-db:amd64 2.7.0.2-2
2015-04-22 20:32:32 status unpacked aptitude:i386 0.6.6-1ubuntu1
2015-04-22 20:32:32 status unpacked aptitude:i386 0.6.6-1ubuntu1
2015-04-22 20:32:32 install ppa-purge:all  0.2.8+bzr56
2015-04-22 20:32:32 status half-installed ppa-purge:all 0.2.8+bzr56
2015-04-22 20:32:32 status unpacked ppa-purge:all 0.2.8+bzr56
2015-04-22 20:32:32 status unpacked ppa-purge:all 0.2.8+bzr56
2015-04-22 20:32:32 trigproc man-db:amd64 2.7.0.2-2 
2015-04-22 20:32:32 status half-configured man-db:amd64 2.7.0.2-2
2015-04-22 20:32:32 status installed man-db:amd64 2.7.0.2-2
2015-04-22 20:53:31 startup packages configure
root@patrick-Z97N-WIFI:~# 

to sudo apt-cache policy phython:

patrick@patrick-Z97N-WIFI:~$ sudo apt-cache policy python
[sudo] password for patrick: 
python:
  Installed: 2.7.9-2
  Candidate: 2.7.9-2
  Version table:
 *** 2.7.9-2 0
        100 /var/lib/dpkg/status
     2.7.8-1 0
        500 http://cz.archive.ubuntu.com/ubuntu/ utopic/main amd64 Packages
patrick@patrick-Z97N-WIFI:~$ 

and sudo apt-get update :

patrick@patrick-Z97N-WIFI:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
patrick@patrick-Z97N-WIFI:~$ sudo apt-get update
[sudo] password for patrick: 
Ign http://cz.archive.ubuntu.com utopic InRelease
Ign http://cz.archive.ubuntu.com utopic-updates InRelease                      
Ign http://cz.archive.ubuntu.com utopic-backports InRelease                    
Hit http://cz.archive.ubuntu.com utopic Release.gpg                            
Ign http://security.ubuntu.com utopic-security InRelease                       
Ign http://extras.ubuntu.com utopic InRelease                                  
Get:1 http://cz.archive.ubuntu.com utopic-updates Release.gpg [933 B]          
Hit http://cz.archive.ubuntu.com utopic-backports Release.gpg                  
Get:2 http://security.ubuntu.com utopic-security Release.gpg [933 B] 
Hit http://extras.ubuntu.com utopic Release.gpg                                
Hit http://cz.archive.ubuntu.com utopic Release                       
Ign http://ppa.launchpad.net utopic InRelease                         
Get:3 http://cz.archive.ubuntu.com utopic-updates Release [63,5 kB]            
Hit http://ppa.launchpad.net utopic Release.gpg                                
Get:4 http://security.ubuntu.com utopic-security Release [63,5 kB]             
Hit http://extras.ubuntu.com utopic Release                                    
Hit http://cz.archive.ubuntu.com utopic-backports Release                      
Hit http://ppa.launchpad.net utopic Release                                    
Hit http://extras.ubuntu.com utopic/main Sources                               
Get:5 http://cz.archive.ubuntu.com utopic/main Sources [1 046 kB]              
Hit http://extras.ubuntu.com utopic/main amd64 Packages                        
Hit http://extras.ubuntu.com utopic/main i386 Packages                         
Get:6 http://security.ubuntu.com utopic-security/main Sources [52,2 kB]        
Hit http://ppa.launchpad.net utopic/main Sources                               
Get:7 http://security.ubuntu.com utopic-security/restricted Sources [2 107 B]  
Hit http://ppa.launchpad.net utopic/main amd64 Packages                        
Get:8 http://security.ubuntu.com utopic-security/universe Sources [12,0 kB]    
Hit http://ppa.launchpad.net utopic/main i386 Packages                         
Get:9 http://security.ubuntu.com utopic-security/multiverse Sources [1 947 B]  
Hit http://ppa.launchpad.net utopic/main Translation-en                        
Get:10 http://security.ubuntu.com utopic-security/main amd64 Packages [173 kB] 
Ign http://extras.ubuntu.com utopic/main Translation-en_US                     
Get:11 http://cz.archive.ubuntu.com utopic/restricted Sources [5 115 B]        
Get:12 http://cz.archive.ubuntu.com utopic/universe Sources [6 736 kB]         
Get:13 http://security.ubuntu.com utopic-security/restricted amd64 Packages [8 496 B]
Ign http://extras.ubuntu.com utopic/main Translation-en                        
Get:14 http://security.ubuntu.com utopic-security/universe amd64 Packages [69,2 kB]
Get:15 http://security.ubuntu.com utopic-security/multiverse amd64 Packages [4 131 B]
Get:16 http://security.ubuntu.com utopic-security/main i386 Packages [171 kB]  
Get:17 http://security.ubuntu.com utopic-security/restricted i386 Packages [8 438 B]
Get:18 http://security.ubuntu.com utopic-security/universe i386 Packages [69,2 kB]
Get:19 http://security.ubuntu.com utopic-security/multiverse i386 Packages [4 321 B]
Hit http://security.ubuntu.com utopic-security/main Translation-en             
Hit http://security.ubuntu.com utopic-security/multiverse Translation-en       
Hit http://security.ubuntu.com utopic-security/restricted Translation-en       
Hit http://security.ubuntu.com utopic-security/universe Translation-en         
Get:20 http://cz.archive.ubuntu.com utopic/multiverse Sources [171 kB]
Get:21 http://cz.archive.ubuntu.com utopic/main amd64 Packages [1 331 kB]
Get:22 http://cz.archive.ubuntu.com utopic/restricted amd64 Packages [12,2 kB]
Get:23 http://cz.archive.ubuntu.com utopic/restricted i386 Packages [12,6 kB]  
Get:24 http://cz.archive.ubuntu.com utopic-updates/multiverse Sources [1 765 B]
Get:25 http://cz.archive.ubuntu.com utopic-updates/main amd64 Packages [324 kB]
Get:26 http://cz.archive.ubuntu.com utopic-updates/restricted amd64 Packages [14,1 kB]
Get:27 http://cz.archive.ubuntu.com utopic-updates/universe amd64 Packages [127 kB]
Get:28 http://cz.archive.ubuntu.com utopic-updates/multiverse amd64 Packages [3 943 B]
Get:29 http://cz.archive.ubuntu.com utopic-updates/main i386 Packages [322 kB]
Get:30 http://cz.archive.ubuntu.com utopic-updates/restricted i386 Packages [14,1 kB]
Get:31 http://cz.archive.ubuntu.com utopic-updates/universe i386 Packages [127 kB]
Get:32 http://cz.archive.ubuntu.com utopic-updates/multiverse i386 Packages [4 102 B]
Get:33 http://cz.archive.ubuntu.com utopic-updates/main Translation-en [145 kB]
Get:34 http://cz.archive.ubuntu.com utopic-updates/universe Translation-en [64,3 kB]
Err http://cz.archive.ubuntu.com utopic/universe amd64 Packages                
  Bad header line [IP: 217.31.202.63 80]
Err http://cz.archive.ubuntu.com utopic/multiverse amd64 Packages              
  Bad header line [IP: 217.31.202.63 80]
Err http://cz.archive.ubuntu.com utopic/main i386 Packages                     
  Bad header line [IP: 217.31.202.63 80]
Err http://cz.archive.ubuntu.com utopic/universe i386 Packages                 
  Bad header line [IP: 217.31.202.63 80]
Err http://cz.archive.ubuntu.com utopic/multiverse i386 Packages               
  Bad header line [IP: 217.31.202.63 80]
Err http://cz.archive.ubuntu.com utopic/main Translation-en                    
  Bad header line [IP: 217.31.202.63 80]
Hit http://cz.archive.ubuntu.com utopic/multiverse Translation-en              
Hit http://cz.archive.ubuntu.com utopic/restricted Translation-en              
Hit http://cz.archive.ubuntu.com utopic/universe Translation-en                
Err http://cz.archive.ubuntu.com utopic-updates/main Sources                   
  404  Not Found [IP: 217.31.202.63 80]
Err http://cz.archive.ubuntu.com utopic-updates/restricted Sources             
  404  Not Found [IP: 217.31.202.63 80]
Err http://cz.archive.ubuntu.com utopic-updates/universe Sources               
  404  Not Found [IP: 217.31.202.63 80]
Hit http://cz.archive.ubuntu.com utopic-updates/multiverse Translation-en      
Hit http://cz.archive.ubuntu.com utopic-updates/restricted Translation-en      
Hit http://cz.archive.ubuntu.com utopic-backports/main Sources                 
Err http://cz.archive.ubuntu.com utopic-backports/restricted Sources           
  404  Not Found [IP: 217.31.202.63 80]
Get:35 http://cz.archive.ubuntu.com utopic-backports/universe Sources [12,0 kB]
Err http://cz.archive.ubuntu.com utopic-backports/multiverse Sources           
  404  Not Found [IP: 217.31.202.63 80]
Hit http://cz.archive.ubuntu.com utopic-backports/main amd64 Packages          
Err http://cz.archive.ubuntu.com utopic-backports/restricted amd64 Packages    
  404  Not Found [IP: 217.31.202.63 80]
Hit http://cz.archive.ubuntu.com utopic-backports/universe amd64 Packages      
Err http://cz.archive.ubuntu.com utopic-backports/multiverse amd64 Packages    
  404  Not Found [IP: 217.31.202.63 80]
Hit http://cz.archive.ubuntu.com utopic-backports/main i386 Packages           
Err http://cz.archive.ubuntu.com utopic-backports/restricted i386 Packages     
  404  Not Found [IP: 217.31.202.63 80]
Hit http://cz.archive.ubuntu.com utopic-backports/universe i386 Packages       
Err http://cz.archive.ubuntu.com utopic-backports/multiverse i386 Packages     
  404  Not Found [IP: 217.31.202.63 80]
Hit http://cz.archive.ubuntu.com utopic-backports/main Translation-en          
Hit http://cz.archive.ubuntu.com utopic-backports/multiverse Translation-en    
Hit http://cz.archive.ubuntu.com utopic-backports/restricted Translation-en    
Hit http://cz.archive.ubuntu.com utopic-backports/universe Translation-en      
Fetched 11,2 MB in 4min 7s (45,0 kB/s)                                         
W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic/universe/binary-amd64/Packages  Bad header line [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic/multiverse/binary-amd64/Packages  Bad header line [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic/main/binary-i386/Packages  Bad header line [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic/universe/binary-i386/Packages  Bad header line [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic/multiverse/binary-i386/Packages  Bad header line [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic/main/i18n/Translation-en  Bad header line [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic-updates/main/source/Sources  404  Not Found [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic-updates/restricted/source/Sources  404  Not Found [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic-updates/universe/source/Sources  404  Not Found [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic-backports/restricted/source/Sources  404  Not Found [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic-backports/multiverse/source/Sources  404  Not Found [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic-backports/restricted/binary-amd64/Packages  404  Not Found [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic-backports/multiverse/binary-amd64/Packages  404  Not Found [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic-backports/restricted/binary-i386/Packages  404  Not Found [IP: 217.31.202.63 80]

W: Failed to fetch http://cz.archive.ubuntu.com/ubuntu/dists/utopic-backports/multiverse/binary-i386/Packages  404  Not Found [IP: 217.31.202.63 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.
patrick@patrick-Z97N-WIFI:~$ 

Try to remove the package you attempted to install by doing:

sudo dpkg --purge <tgz_package_converted_to_deb>

Alternatively you can try sudo dpkg --purge --pending but I think it could break your entire system since you have a lot of unmet dependencies issued by this python's installing attempt.


Force a downgrade to the lower version of python:

sudo apt-get install python=2.7.8-1

If that doesn't work, download it, and use dpkg directly:

sudo apt-get download python=2.7.8-1
sudo dpkg -i python_2.7.8-1*.deb

Python is too important a package to be messed with, or even removed.