我正在尝试使用Python Debugger。
我不知道这里出了什么问题,
def main():
print "over ipdb"
import ipdb; ipdb.set_trace()
low, high = 0, 1
for i in xrange(10):
print high
low, high = high, low + high
if __name__ == '__main__':
main()
终端继续显示:
over ipdb
Before the function runs
I am a stand alone function, don't you dare modify me
After the function runs
Traceback (most recent call last):
File "pydebudder.py", line 12, in <module>
main()
File "pydebudder.py", line 5, in main
import ipdb; ipdb.set_trace()
File "/usr/local/lib/python2.7/dist-packages/ipdb/__init__.py", line 16, in <module>
from ipdb.__main__ import set_trace, post_mortem, pm, run, runcall, runeval, launch_ipdb_on_exception
File "/usr/local/lib/python2.7/dist-packages/ipdb/__main__.py", line 27, in <module>
import IPython
File "/usr/local/lib/python2.7/dist-packages/IPython/__init__.py", line 45, in <module>
from .config.loader import Config
File "/usr/local/lib/python2.7/dist-packages/IPython/config/__init__.py", line 6, in <module>
from .application import *
File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 17, in <module>
from IPython.external.decorator import decorator
ImportError: cannot import name decorator
我将ipython升级到3.0.0