[問題] 新手發問 mac下使用matplotlib

作者: roony (Roony)   2017-10-25 01:07:37
Python: 2.7.14
macOS: 10.13
本人新手剛學完Python基本語法
正在練習matplotlib numpy scipy等module
在terminal執行已建好的py檔案時
遇到matplotlib會出現
AttributeError: ‘FigureManagerMac’ object has no attribute ‘window’
但如果直接在terminal撰寫程式碼
就不會出現這問題
且相同的py檔案在windows下執行正常
有試著自己google
查到mac下的matplotlib的backend為”macosx”
僅能在interactive 的狀態下繪圖
請問該如何設定才能在mac環境下直接執行含有matplotlib的py檔案?

Links booklink

Contact Us: admin [ a t ] ucptt.com