dpkg -configure python2.7If it fails with a message like this:
Setting up python2.7 (2.7.4-2ubuntu3) ... Traceback (most recent call last): File "/usr/lib/python2.7/py_compile.py", line 170, indo not get fooled!sys.exit(main()) File "/usr/lib/python2.7/py_compile.py", line 162, in main compile(filename, doraise=True) File "/usr/lib/python2.7/py_compile.py", line 106, in compile with open(file, 'U') as f: IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/profile.py'
Probably you have a copy of that file named /usr/lib/python2.7/profile.py.distrib! So copy to the original place. You will also need to copy pstats.py.distrib.
cp /usr/lib/python2.7/profile.py.distrib /usr/lib/python2.7/profile.py cp /usr/lib/python2.7/pstats.py.distrib /usr/lib/python2.7/pstats.pyThen you can continue with your upgrade:
dpkg -configure python2.7 dpkg -configure -a apt-get dist-upgradeI suspect the reason for that is an easy installed distribute. More on this later.