Interactive Python: cannot get `%lprun` to work, although line_profiler is imported properly
- 阅读更多 关于 Interactive Python: cannot get `%lprun` to work, although line_profiler is imported properly
Problem Most iPython "magic functions" work fine for me right off the bat: %hist , %time , %prun , etc. However, I noticed that %lprun could not be found with iPython as I'd installed it originally. Attempt to Resolve I then discovered that I should install the line_profiler module. I have installed this module, but still cannot seem to get the magic function to work correctly. If I attempt to call %lprun , iPython still cannot find the function. If I call it with the full name ( line_profiler.magic_lprun ), the function can be found, but I cannot get it to work at all. Below is an example of