0

I tried following methods, but I always got error.
I tried:
1. Use ipython3 notebook --matplotlib inline in Mac console to launch iPython notebook.
Or/And
2. Use %matplotlib inline in the first cell of iPython notebook.

I got this error:

/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/core/formatters.py:239: FormatterWarning: Exception in image/png formatter: Could not create write struct FormatterWarning,

I followed the solution @cel showed me (uninstall XQuartz), but I got the same error:

/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/IPython/core/formatters.py:239: FormatterWarning: Exception in image/png formatter: Could not create write struct FormatterWarning,

And if I execute both 1 (ipython3 notebook --matplotlib inline) and 2 (%matplotlib inline), I only got this message:

<matplotlib.figure.Figure at 0x1089fab50>

Additional info:
1. OS X (10.9.5), Python 3.3.3
2. If I use ipython3 notebook --matplotlib=osx to launch ipython notebook, the figure pops up in a different window (not inline).

user51966
  • 967
  • 3
  • 9
  • 21
  • 1
    This is question is probably related: http://stackoverflow.com/questions/22898245/libpng-version-incompatibility-in-fresh-installation-of-ipython – cel Jan 18 '15 at 17:26
  • Thank you for your comment, @cel ! I followed the instructions in the page above, and it seems I got the same error. I updated my original question. – user51966 Jan 19 '15 at 00:43
  • Just to be sure: did you reinstall matplotlib after temporarily uninstalling xquartz? – cel Jan 19 '15 at 08:15
  • Yes, I execute `pip3 install matplotlib` but it was returned that 'Requirement already satisfied'. – user51966 Jan 19 '15 at 09:19
  • 1
    You didn't reinstall then. Try `pip3 install --upgrade --force-reinstall matplotlib` – cel Jan 19 '15 at 09:40

0 Answers0