Python problem on ubuntu raring ringtail upgrade

If the upgrade to *buntu 13.04 raring ringtail fails on Python2.7 try to configure it:
dpkg -configure python2.7
If 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, in 
    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'
do not get fooled!

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.py
Then you can continue with your upgrade:
dpkg -configure python2.7
dpkg -configure -a
apt-get dist-upgrade
I suspect the reason for that is an easy installed distribute. More on this later.