运行matplotlib或enthought.mayavi.mlab从一个py-shell里面的emacs在windows上 [英] running matplotlib or enthought.mayavi.mlab from a py-shell inside emacs on windows
问题描述
我可以从常规cmd shell运行以下代码:
I can run the following code fine from a regular cmd shell:
import matplotlib.pyplot as plt
fig = plt.figure()
plt.show()
它启动一个matplotlib窗口。
但是,使用shell或py-shell运行在emacs中:缓冲区挂起,没有启动窗口。任何人知道这里发生了什么,还是如何解决?
谢谢。
It launches a matplotlib window.
However, running inside emacs using shell or py-shell: the buffer just hangs and no window is launched. Anyone know what's going on here, or how to fix it ?
Thanks.
推荐答案
在大量的时间之后,在matplotlib项目页面和python上发布错误-mode页面我发现,提供参数控制台--matplotlib在ipython.bat将做的诀窍matplotlib 1.3.1和ipython 1.2.0
Well after a tremendous amount of time and posting the bug on the matplotlib project page and the python-mode page I found out that supplying the arguments console --matplotlib in ipython.bat will do the trick with matplotlib 1.3.1 and ipython 1.2.0
这是什么我有我的iphython.bat
This is what I have in my iphython.bat
@ python.exe -i D:\devel\Python27\Scripts\ipython-script.py控制台--matplotlib %*
@python.exe -i D:\devel\Python27\Scripts\ipython-script.py console --matplotlib %*
这篇关于运行matplotlib或enthought.mayavi.mlab从一个py-shell里面的emacs在windows上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!