→ Arim:我不是用IDE 我是直接呼叫python test.py 06/04 14:47
→ Arim:只是這樣不知道為什麼沒辦法show出圖出來 06/04 14:48
→ KSJ:是用Windows 還是linux? 06/04 21:17
→ Arim:Ubuntu 10.04 06/05 11:49
我用ubuntu 10.04
灌matplotlib發現沒灌numpy
灌numpy用網路下載1.6.2的tar.gz
sudo python setup.py install
雖然紅字一堆 但可以裝完 就沒理它
然後灌matplotlib用
sudo easy_install -m matplotlib (若沒easy_install也要先裝)
可是裝完他最後它跟我說
Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:
pkg_resources.require("matplotlib") # latest installed version
pkg_resources.require("matplotlib==1.1.0") # this exact version
pkg_resources.require("matplotlib>=1.1.0") # this version or higher
所以我把程式碼改成如下圖所示 結果也可以跑如下圖所示
https://dl.dropbox.com/u/24628527/ubuntu_matplotlib_test.PNG
推 popmentos:如果舊版OK,可sudo apt-get install python-matplotlib 06/12 12:57
→ popmentos:和 install python-numpy 06/12 12:58