【问题标题】:IPython not available in PyDev consoleIPython 在 PyDev 控制台中不可用
【发布时间】:2012-03-28 04:15:36
【问题描述】:

我想在 Eclipse/PyDev 中使用 IPython 解释器。 然而,PyDev 无法识别我的 IPython 安装。

我得到的结果如下:

>>> import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))
PyDev console: using default backend (IPython not available).
D:\QuantumGIS\apps\Python25\python.exe 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
>>> import IPython
>>>

“import IPython”命令确实有效。 我正在使用

  • Windows XP 32 位
  • Eclipse 3.7.2
  • PyDev 2.4.0
  • IPython 0.10.2
  • Python 2.5(随 QGIS 1.7.3 提供的版本)

我应该如何设置 PyDev 以便可以使用 IPython 作为交互式解释器?

【问题讨论】:

    标签: eclipse pydev ipython qgis


    【解决方案1】:

    不确定是否是同一个问题,但在 Fabio 的博客中,他说要在 python 控制台中尝试(导入 IPython 工作正常):

    from IPython.frontend.terminal.interactiveshell import TerminalInteractiveShell
    

    这没有给我任何有用的东西,并且:

    from IPython.frontend.prefilterfrontend import PrefilterFrontEnd
    

    抱怨没有安装twis​​ted。我为 Python 2.5 安装了 twisted 12.0 和它的依赖项 Zope(Python 2.5 为 3.8),重新启动了 IDE,控制台现在显示 ipython。 ipython 确实使用 XMLRPC 与 IDE 进行通信,所以我想这需要 twisted。

    希望对您有所帮助。

    斯图。

    • Windows 7
    • Aptana studio 3.1.2(eclipse版本)
    • PyDev 2.5.0 IPython 0.10
    • Python 2.5(需要一些我正在处理但尚未使用的旧代码 尚未升级)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-12-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-17
      • 2013-01-27
      相关资源
      最近更新 更多