在Mac OS X Yosemite上安装Matplotlib for Python 3.2.2?

时间:2015-02-06 14:16:35

标签: python macos matplotlib python-3.2

对于我的大学物理课,我们需要安装Python 3.2.2和一个名为matplotlib的模块。我已成功安装Python 3.2.2和Visual Python。然而,我的许多同事(包括教授)都试图让matplotlib使用Python 3.2.2。我们尝试过MacPorts:

sudo port install py32-matplotlib

我们一直收到错误:

Port py32-matplotlib not found.

包括我在内的一些学生已经使用了使用python 2.7的Anaconda,但我们希望能够使用3.2.2以便跟上课程。

1 个答案:

答案 0 :(得分:1)

Python 3.2没有matplotlib的macport:

https://www.macports.org/ports.php?by=name&substr=matplotlib

您应该将Python解释器升级到3.3或3.4并再试一次:

sudo port install py33-matplotlib

sudo port install py34-matplotlib

如果必须使用Python 3.2,可以尝试使用pip安装它:

sudo port install py32-pip
sudo pip-3.2 install matplotlib