Matplotlib kann in Ubuntu 12.04 mit installiertem Canopy nicht aktualisiert werden

Ich versuche zu aktualisierenmatplotlib imUbuntu 12.04. Wenn ich den Befehl ausführe:

sudo pip install --upgrade matplotlib

Ich erhalte diesen Fehler:

Downloading/unpacking matplotlib
  Running setup.py egg_info for package matplotlib
    The required version of distribute (>=0.6.28) is not available,
    and can't be installed while this script is running. Please
    install a more recent version first, using
    'easy_install -U distribute'.

    (Currently using distribute 0.6.24dev-r0 (/usr/lib/python2.7/dist-packages))
    Complete output from command python setup.py egg_info:
    The required version of distribute (>=0.6.28) is not available,

and can't be installed while this script is running. Please

install a more recent version first, using

'easy_install -U distribute'.

(Currently using distribute 0.6.24dev-r0 (/usr/lib/python2.7/dist-packages))

----------------------------------------
Command python setup.py egg_info failed with error code 2
Storing complete log in /home/gabriel/.pip/pip.log

Also laufe ich:

easy_install -U distribute

und ich bekomme:

Traceback (most recent call last):
  File "/home/gabriel/Enthought/Canopy_32bit/User/bin/easy_install", line 9, in <module>
    load_entry_point('distribute', 'console_scripts', 'easy_install')()
  File "/home/gabriel/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/setuptools-0.9.8-py2.7.egg/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/gabriel/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/setuptools-0.9.8-py2.7.egg/pkg_resources.py", line 2565, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'easy_install') not found

Es funktioniert also etwas nicht mit meinemCanopy Installieren. Ich benutzeSpyder im Moment könnte ich also deinstallierenCanopy um zu sehen ob das hilft, aber die befehlesudo apt-get remove enthought* undsudo apt-get remove canopy* finde nichts zu entfernen.

Was kann ich tun, um matplotlib zu aktualisieren?

Hinzufügen

Ich habe die Anweisungen zum Entfernen befolgtCanopy vonHier und jetzt, wenn ich renneeasy_install -U distribute Ich bekomme:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

Ich glaube, das hängt damit zusammen, dass ich die Zeile löschesource ~/Enthought/Canopy_64bit/User/bin/activate von~/.profile. Ich habe versucht, die folgenden Befehle als sudo auszuführen:

apt-get autoclean
apt-get clean
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get -f install
dpkg --configure -a
apt-get install --reinstall python

aber das hat nicht funktioniert. Irgendwelche Ideen, wie man das behebt?

Addiere 2

Ich habe versucht, Einstellungen vorzunehmenPYTHONHOME mit dem Befehl:

export PYTHONHOME=/usr/lib/python2.7

und nuneasy_install -U distribute kehrt zurück:

ImportError: No module named site

Gleiches mit:

export PYTHONHOME=/usr/local/lib/python2.7

Also jetzt los, um diesen Fehler zu jagen.

3 hinzufügen

Rahmen:

export PYTHONHOME=/usr/lib/python2.7/

und dann den Befehl als ausführensudo:

sudo easy_install -U distribute

hat den Trick gemacht. Ich könnte dann rennensudo pip install --upgrade matplotlib. Ich werde dies gleich als Antwort hinzufügen.

Antworten auf die Frage(1)

Ihre Antwort auf die Frage