Nie można uaktualnić matplotlib w Ubuntu 12.04 z zainstalowanym Canopy

Próbuję uaktualnićmatplotlib wUbuntu 12.04. Kiedy uruchomię polecenie:

sudo pip install --upgrade matplotlib

Dostaję ten błąd:

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

Więc biegam:

easy_install -U distribute

i dostaję:

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

Więc coś nie działa z moimCanopy zainstalować. używamSpyder teraz mogę odinstalowaćCanopy aby zobaczyć, czy to pomaga, ale poleceniasudo apt-get remove enthought* isudo apt-get remove canopy* nie znaleźć nic do usunięcia.

Co mogę zrobić, aby uaktualnić matplotlib?

Dodaj

Postępowałem zgodnie z instrukcjami, aby usunąćCanopy ztutaj a teraz, gdy biegnęeasy_install -U distribute Dostaję:

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

co, jak sądzę, wiąże się ze skreśleniem liniisource ~/Enthought/Canopy_64bit/User/bin/activate z~/.profile. Próbowałem uruchomić następujące polecenia jako sudo:

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

ale to nie zadziałało. Jakieś pomysły, jak to naprawić?

Dodaj 2

Próbowałem ustawieniaPYTHONHOME za pomocą polecenia:

export PYTHONHOME=/usr/lib/python2.7

i terazeasy_install -U distribute zwraca:

ImportError: No module named site

To samo z:

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

Więc teraz pogoń za tym błędem.

Dodaj 3

Oprawa:

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

a następnie uruchom polecenie jakosudo:

sudo easy_install -U distribute

zrobiłem sztuczkę. Mogłem wtedy uciekaćsudo pip install --upgrade matplotlib. Dodam to jako odpowiedź za minutę.

questionAnswers(1)

yourAnswerToTheQuestion