[問題] matplotlib module import 的錯誤。
各位 Python 的前輩好,我是剛使用 Python 不到半年的新手。
我安裝的 MatplotLib 版本來自:http://www.lfd.uci.edu/~gohlke/pythonlibs/
版本:matplotlib-1.1.0.dev.win-amd64-py3.2.exe
目前遇到的問題是,我在其它地方建立的 py 檔,無法成功 import 這個模組,
可是在 IDLE 內確可以 import 進來,並成功畫出圖形。
我還需要加入其它指令嗎?以下是我 import 的指令。
************** 原 始 碼 *****************
#!/usr/bin/python
from numpy import *
from matplotlib.pyplot import *
# evenly sampled time at 200ms intervals
t=arange(0., 5., 0.2)
# red dashes, blue squares and green triangles
plot(t, t, "r--", t, t**2, "bs", t, t**3, "g^")
show()
************** 結 果 **************
Traceback (most recent call last):
File "D:\Documents\Programe\ExamplePython\matplotlib.py", line 3, in
<module>
from matplotlib.pyplot import *
File "D:\Documents\Programe\ExamplePython\matplotlib.py", line 3, in
<module>
from matplotlib.pyplot import *
ImportError: No module named pyplot
****************************************
不懂,難道這個版本有 Bug?
--
虎 ◢◣ ◢◣ 傻 ︱ ◢ ◣ 苛
毒 爹會吃我嗎?◢ 王 ◣ 孩怎 ︱ 大哥! 爹! ◤ 好吃! 鄭
不 \ ▁︶ ︶▁ 子麼 ︱ \ \ □︵□◥ ╯ 猛
食 ◣ ◢ ▁≡▼≡▁ /,可 ︱ `~●" ~● ◥▽ ◤ 於
子 ∥ ◥ ┴ ◤ 能 ︱ ~●~● ◥.██.◤ 虎
。 。⊥。 ◥ ◤ ! ︱ ╰───╯ by menb !
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 120.105.128.53
※ 編輯: non036 來自: 120.105.128.53 (11/03 18:09)
→
11/04 00:06, , 1F
11/04 00:06, 1F
→
11/04 06:35, , 2F
11/04 06:35, 2F
→
11/04 11:16, , 3F
11/04 11:16, 3F
→
11/04 12:10, , 4F
11/04 12:10, 4F
→
11/04 12:10, , 5F
11/04 12:10, 5F
→
11/04 15:38, , 6F
11/04 15:38, 6F
Python 近期熱門文章
PTT數位生活區 即時熱門文章