The comment sudo apt-get install python-matplotlib is installing 1.1.1rc version, not the latest version. I need the matplotlib 1.3.1 for hatch fill between curves. No upgradation command found that lead to success. Nothing helpful in the web, that successfully works. Please help. Ubuntu version 12.04.
Asked
Active
Viewed 6,380 times
2
-
Repositories don't have the newest versions. Use `sudo pip install matplotlib` – Uli Köhler Feb 28 '14 at 20:22
-
I understood nothing. Can you please give me a complete code/command that works fine? – deltasata Feb 28 '14 at 20:32
-
The command you need to use is `sudo pip install matplotlib`. You might need to `sudo apt-get install pip` before. Please add more details to your question, if you found nothing, please tell us what you searched for! – Uli Köhler Feb 28 '14 at 20:34
-
okay currently i have matplotlib 1.1.1rc (installed) with python 2.7. I need the latest 1.3.1 version. or at least the git that corrects the bug regarding hatch fill_between curves. My ubuntu is 12.04 lts. – deltasata Feb 28 '14 at 20:44
-
yesterday, i followed http://stackoverflow.com/questions/18064159/cant-upgrade-matplotlib After that python or ipython was not recognized in the terminal. – deltasata Feb 28 '14 at 20:45
-
Sorry, forgot you need to use `sudo pip install --upgrade matplotlib` if you currently have installed it. Not absolutely sure if you have. – Uli Köhler Feb 28 '14 at 20:52
-
Can I remove my matplotlib, and install a fresh copy of version 1.3.1? Yesterday i used sudo pip install --upgrade matplotlib . but got errors. So i followed exactly the answer steps (only) of http://stackoverflow.com/questions/18064159/cant-upgrade-matplotlib after that python was not recognized. So what to do? – deltasata Feb 28 '14 at 20:56
-
It depends on how you installed it. You could try `sudo apt-get remove python-matplotlib`, but I don't think that will have a real advantage. I use pip upgrade as described by me above several times on several Ubuntu boxes. Neither has is caused any error one one of them, nor can I see any reason why this would be so dangerous that it could break python – Uli Köhler Feb 28 '14 at 20:58
-
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'. I GOT THIS ERROR. I GOT IT YESTERDAY ALSO. – deltasata Feb 28 '14 at 21:11
-
This error message is as clear as it will get. It even tells you the command to use. Is there any specific reason why you don't simply execute the command listed in the error message? – Uli Köhler Feb 28 '14 at 21:12
-
[Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-7568.pth' Now i got this error while tried to execute 'easy_install -U distribute' – deltasata Feb 28 '14 at 21:17
-
You need to execute that as root, via `sudo`, unless you are inside a virtualenv (if you don't know that you are inside one, you are not inside one). – Uli Köhler Feb 28 '14 at 21:17
-
so the code will be, sudo easy_install -U distribute ? – deltasata Feb 28 '14 at 21:20
-
Yes, `sudo easy_install -U distribute `, is correct! – Uli Köhler Feb 28 '14 at 21:21
-
THANKS. IT WORKS FINE. ITS A PLEASURE TO GET SCOLDED FROM YOU. – deltasata Feb 28 '14 at 21:32
-
Happy to have helped ;-) Sorry if I was too scolding ;-) – Uli Köhler Feb 28 '14 at 21:38
-
I created an answer below that should resolve all the problems you encountered initially. Please be so kind and review/accept it if you deem it appropriate, so other users with the same problem won't have to get scolded by me ;-) – Uli Köhler Feb 28 '14 at 21:45
1 Answers
5
The ubuntu repositories do not contain the most recent versions. You can use pip
to install the latest versions.
If you don't have pip installed, use sudo apt-get install pip
to install it.
Then use
sudo pip install --upgrade matplotlib
to upgrade matplotlib to the most recent version.
In case, you get an error message like
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'
execute
easy_install -U distribute
and try sudo pip install --upgrade matplotlib
again.

Uli Köhler
- 13,012
- 16
- 70
- 120