Christopher Barker wrote:
giovanni ruggiero wrote:
I had problens to use the function quiver with the matplotlib 82-5. Eric advice me to upgrade the mpl. I have tried to upgrade the matplotlib but i have to upgrade almost all my libs. The case is that i can not upgrade these dependences without affect all my configuration wich means that i need to install my system again. Am i correct?
You should be able to have newer version of libs alongside the old ones. If there are not compatible packages (rpms, debs, whatever) for the newer libs, you should be able to build them by hand (./configure, make, etc). Just make sure they are installed in /usr/local/...
If John's "apt-get" solution does not work--and it is my impression that there are many circumstances under which it will not work, even if it "should"--and you do not want to do a full install of something like ubuntu Edgy, then I think that the simplest way to have a working up-to-date mpl is to install *only* mpl from svn or from the tarball. As far as I know, current mpl depends on current numpy *if* you use numpy as your numerix choice; but if you use Numeric or numarray then none of the libraries used by mpl has to be very new, so you should not have to build anything other than mpl from source. As Chris says, putting it in /usr/local is a good idea: "python setup.py build; sudo python setup.py install --prefix=/usr/local" should do it. f the build fails, it will almost certainly be because a header file is missing, in which case you can install the corresponding dev package from your *present* version of ubuntu or whatever. This is likely to be an iterative process because several -dev packages will be needed.
The nice thing about doing it this way is that updating to any subsequent mpl release or svn version is fast and easy, so you can take advantage of improvements without waiting for a packager to make a binary package for your particular distribution version.
Can anyone either confirm that my advice works in practice, or if not, say where it goes wrong? This question of how to have up-to-date mpl on a not-so-up-to-date linux installation keeps coming up.
Longer term I would encourage everyone to find a way ASAP to update whatever is necessary to have an up-to-date numpy rather than using old Numeric or numarray, so the advice in my first paragraph is intended as a stopgap. The same basic method can in fact be used to install the latest numpy release. (Does anyone know of a reason this would not work for an older linux distribution version?) It is critical that mpl be built *after* installing whatever numerical package is going to be used, however.