EnsekiTT Blog

EnsekiTTが書くブログです。

OSXでvirtualenv と matplotlibを共存させようとして詰まった。

環境: OS X El Capptan MacBook Pro(Retina, 13-inch, Early 2013)

Virtualenvで環境を用意して、pip install matplotlib入れて、

import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
plt.show()

したら、

RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are Working with Matplotlib in a virtual enviroment see 'Working with Matplotlib in Virtual environments' in the Matplotlib FAQ

って怒られたって苦情がいっぱい飛んできたので、

TkAggでもつかってくれや。と紹介した。

echo backend : TkAgg > ~/.matplotlib/matplotlibrc

こんなんなったって、報告が来たので解決。 スクリーンショット 2016-01-05 21.36.40

クリエイティブ・コモンズ・ライセンス
この 作品 は クリエイティブ・コモンズ 表示 4.0 国際 ライセンスの下に提供されています。