问题
I'm trying to install vn 1.2 of Matplotlib on my Ubuntu computer so that I can use some of the animation features. Crucially I also need Basemap.
The only way I've found of importing Basemap is through apt-get. I can install matplotlib 1.2 loads of different ways - using pip, apt-get and from source, but no matter what I do, when it comes to typing in
sudo apt-get install python-mpltoolkits.basemap
I'm always told that matplotlib will be installed because apt-get can't see the version 1.2 that I already have.
I've also tried installing Basemap from source (using the instructions on this wonderful website:http://peak5390.wordpress.com/2012/12/08/matplotlib-basemap-tutorial-installing-matplotlib-and-basemap/) but I'm running into GEOS-related problems that I have no idea how to start solving. If I can use apt-get for installing Basemap then I'd be very happy.
Thank you
回答1:
sudo apt-get install libgeos-dev
sudo pip3 install -U git+https://github.com/matplotlib/basemap.git # latest Version from Source 1.2
Older Version might not be compatible with the matplotlib.
来源:https://stackoverflow.com/questions/18386132/installing-matplotlib-vn-1-2-and-basemap-on-ubuntu