在Ubuntu上安装Matplotlib vn 1.2和Basemap [英] Installing matplotlib vn 1.2 and Basemap on Ubuntu

查看:160
本文介绍了在Ubuntu上安装Matplotlib vn 1.2和Basemap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Ubuntu计算机上安装Matplotlib的vn 1.2,以便可以使用某些动画功能.至关重要的是,我还需要底图.

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.

我发现导入底图的唯一方法是通过apt-get.我可以通过不同的方式安装matplotlib 1.2负载-使用pip,apt-get和从源代码安装,但是无论我做什么,都要输入

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

我总是被告知将安装matplotlib,因为apt-get无法看到我已经拥有的1.2版.

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.

谢谢

推荐答案

sudo apt-get install libgeos-dev

sudo pip3 install -U git+https://github.com/matplotlib/basemap.git  # latest Version from Source 1.2

旧版本可能与matplotlib不兼容.

Older Version might not be compatible with the matplotlib.

这篇关于在Ubuntu上安装Matplotlib vn 1.2和Basemap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆