调试在pycharm上失败

时间:2015-09-01 10:41:09

标签: python django python-2.7 pycharm jetbrains-ide

我是Python新手并尝试使用PyCharm运行脚本。当我运行脚本时,我得到以下输出

/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
-u /Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_run_in_console.py 56230 56231 

/Users/chintan.shah/Documents/python-dev/python-scripts/src/examples/kalman_filter.py 29325

/usr/local/lib/python2.7/site-packages/IPython/utils/traitlets.py:5:
UserWarning: IPython.utils.traitlets has moved to a top-level traitlets package.
warn("IPython.utils.traitlets has moved to a top-level traitlets package.")

Running /Users/chintan.shah/Documents/python-dev/python-scripts/src/examples/kalman_filter.py
PyDev console: using IPython 4.0.0

此外,当我尝试调试时,代码不会在调试点停止,我收到警告

IPython.utils.traitlets has moved to a top-level traitlets package.
warn("IPython.utils.traitlets has moved to a top-level traitlets package.")

脚本应该显示一些图,但事实并非如此。当我在PyCharm中将整个文件复制粘贴到Python控制台中时,一切正常。

1 个答案:

答案 0 :(得分:1)

也许你安装了IPython 4.0。如果是这种情况,我建议你降级你的版本。我也使用Pycharm,我在我的案例中做的是禁用IPython,如以下链接中所述:Disable ipython console in pycharm