我從macports安裝了matplotlib,python的版本是2.7.1。我想在osx lion中使用matplotlib
$ sudo port install py27-matplotlib py27-matplotlib-basemap
我在下面寫了一個示例程序。
#!/usr/bin/python
# -*- coding: utf-8 -*-
from pylab import *
plot([1,2,3])
show()
但是,這個錯誤日誌「no module named pylab」無法正常工作。
我嘗試了easy_install。
$ sudo easy_install matplotlib
在這種情況下,我的程序工作正常,沒有錯誤。
這兩種情況(macports和easy_install)有什麼區別?
我認爲matplotlib的版本在兩種情況下是相同的。
在macports的情況下,我是否必須重新定義包含路徑?
你能幫我嗎?
您是否閱讀過這篇文章:http://matplotlib.sourceforge.net/faq/installing_faq.html#os-x-notes – Blender 2011-12-17 07:04:09