Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Line magic function `%matplotlib` not found

Tags:

I am the rawest of raw newbies. I have just installed IPython on a Mac (MacOS 10.7.5) following the instructions for anaconda on http://ipython.org/install.html, with no obvious errors. I now want to work my way through the example notebooks. In notebook "Part 1 - Running Code", everything works as it should until I get to

%matplotlib inline

Then I get the error message

ERROR: Line magic function %matplotlib not found.

Everything after that works, except that plots, instead of appearing inline, pop up in a new window.

like image 518
Leon Avery Avatar asked Aug 11 '13 19:08

Leon Avery


1 Answers

Try:

import IPython print(IPython.sys_info()) 

Does it report that you are on 'ipython_version' 1.0+? You might be picking up an older version of IPython that do not have the %matplotlib magic.

like image 172
Matt Avatar answered Oct 03 '22 04:10

Matt