无法按指示执行内存分析

2024-06-26 13:09:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我正跟随http://pynash.org/2013/03/06/timing-and-profiling/尝试进行内存分析,但是当我启动ipython时,出现了错误。。。你知道吗?谢谢

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

Tags: and内存noorghttpobject错误ipython
1条回答
网友
1楼 · 发布于 2024-06-26 13:09:50

ipython_config.py文件更改为使用以下命令可能会修复它

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

注意删除每个扩展的_ext

相关问题 更多 >