Visualizzazione post con etichetta Ubuntu. Mostra tutti i post
Visualizzazione post con etichetta Ubuntu. Mostra tutti i post

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.

Come installare Python 2.6 su Precise Pangolin

La nuova Release di Ubuntu (Precise Pangolin, 12.04), ha rimosso il supporto a Python2.6 in favore di Python2.7.

Al momento non ci sono PPA dedicati all'installazione di Python2.6 per questa release.

Se volete installare una versione pacchettizzata di Python2.6 potete usare questo script (ispirato da questo thread) ovviamente a vostro rischio e pericolo ®  :) :

How to install Python 2.6 on Precise Pangolin

The new Ubuntu Release (Precise Pangolin, 12.04), dropped Python2.6 support in favor of Python2.7.

At the moment there is no PPA repository set up to install Python2.6.

If you want to install a packaged version of Python2.6 you can use this script, inspired by this thread, of course at your own risk ® :):