Installing matplotlib vn 1.2 and Basemap on Ubuntu

China☆狼群 提交于 2019-12-11 07:52:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!