使用pyenv安装Python 3后,在Ubuntu 14.04上安装matplotlib

我正在使用Ubuntu 14.04和Python 2.7.6。 我已经为Python 2安装了matplotlib 。现在,我刚刚使用pyenv install 3.4.2安装了Python pyenv install 3.4.2 。 然后我运行pip install matplotlib为Python 3安装matplotlib 。后来我发现了用于Ubuntu 14.04的python3-matplotlib包。 我想知道:我应该使用sudo apt-get install python3-matplotlib吗? 使用Python 2 matplotlib并行安装Python 3的matplotlib的首选方法是什么?

我现在没有Ubuntu系统。 但我想我仍然可以帮助你。

打开你的终端并输入

 apt-cache search python3-matplotlib 

如果您发现它可用,那么您可以从中安装它

 sudo apt-get install python3-matplotlib 

这是最喜欢的方式。

现在如何使用matplotlib与python 3.我在这里也发布了一个关于如何并排使用python2和python3的问题。

很简单,在使用python3-matplotlib执行程序时使用python3

同样,如果你使用python2,那么它将加载python 2。

希望有所帮助。

这是libgeos的开发文件的问题。 我遇到了同样的问题,通过安装这些库解决了这个问题。 希望能帮助到你。