user40780
user40780

Reputation: 1920

cannot perform memory profiling as instructed

I am following http://pynash.org/2013/03/06/timing-and-profiling/ exactly to trying to do memory profiling, but when I started ipython, I got the error... Any idea? Thanks

AttributeError: 'TerminalInteractiveShell' object has no attribute 'define_magic'

Upvotes: 0

Views: 87

Answers (1)

Jess
Jess

Reputation: 429

Changing the ipython_config.py file to use the following may fix it.

c.TerminalIPythonApp.extensions = [ 'line_profiler', 'memory_profiler', ] c.InteractiveShellApp.extensions = [ 'line_profiler', 'memory_profiler', ]

Note the removal of the _ext for each extension.

Upvotes: 1

Related Questions