我以前认为这是IPython的问题所在,但是今天我再次进行了测试,下面是我所做的:
emacs -QM-x,然后运行python-shell-switch-to-shell、RET和RET。然后我准备好了Python外壳Python2.7.3(默认,2012年4月10日,23:31:26) MSC v.1500 32位(英特尔)在win32类型“帮助”、“版权”、“信用”或“许可”上获得更多信息。>>>导入matplotlib.pyplot as plt >>> plt.ion() >>> plt.plot(1,2,3) >>>
实际上,在此之后,没有任何图形出现,外壳被冻结,例如,当我输入:
打印(“你好”)
什么都没发生.除了matplotlib我还没测试过其他绘图工具。我不知道是不是虫子。我已经搜索了一段时间,这里和谷歌,但没有运气。我的系统是:用于Windows的Emacs24.3 32位,在Windows 7下。如果其他人可以复制与这里相同的问题,我将报告为一个错误。
我通过以下方法使用IPython作为Python:
C:/Python27/python.exe -i C:/Python27/Scripts/ipython-script.py --pylab然后,我输入figure(); plot([1,2,3]),就像预期的那样,这个数字弹出并冻结。然后我做了:C-c C-d,它运行comint-send-eof,而这个数字实际上得到了更新的!但是,我的IPython shell会话也以以下消息结束:
In [6]:
Do you really want to exit ([y]/n)?
Traceback (most recent call last):
File "C:/Python27/Scripts/ipython-script.py", line 9, in <module>
load_entry_point('ipython==0.13.1', 'console_scripts', 'ipython')()
SystemExit
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True有什么有用的线索吗?!
发布于 2013-09-11 15:22:30
一个解决办法是:
(setq python-shell-interpreter "C:\\YourPython3Dist\\python.exe"
python-shell-interpreter-args "-i C:\\YourPython3Dist\\Scripts\\ipython3-script.py console --pylab=qt")在ipython-script.py调用中的参数console 是重要的!
在带有qt后端的Python 3中,它适用于我。我不知道py 2.7是如何工作的。(如果ipytho-script.py支持这些参数,就不会有问题)
发布于 2013-06-16 00:17:04
我想要花些时间才能解决这个问题。直到一些Windows用户实际调试python.el。
在那之前,为什么不试试Emacs IPython笔记本呢?这是一个更好的IPython绑定Emacs。你不需要用笔记本的部分。您可以将其视为python.el中python.el的替代品。(免责声明:我是作者)
https://stackoverflow.com/questions/17117074
复制相似问题