首页 文章

从Windows上的emacs内的py-shell运行matplotlib或enthought.mayavi.mlab

提问于
浏览
2

我可以从常规cmd shell运行以下代码:

import matplotlib.pyplot as plt
fig = plt.figure()
plt.show()

它启动了一个matplotlib窗口 .
但是,使用shell或py-shell在emacs中运行:缓冲区只是挂起而没有启动窗口 . 任何人都知道这里发生了什么,或者如何解决它?谢谢 .

2 回答

  • 0

    得到它ipython.el . 不得不添加修改python26 \ scripts \ ipython.bat

    @"c:\Python26\python.exe" "-i" "c:\Python26\scripts\ipython.py" "-wthread" %*
    

    然后在emacs中:

    (setq ipython-command "c:/python26/scripts/ipython.bat")
    (require 'ipython)
    (py-shell)
    
  • 0

    经过大量的时间并在matplotlib项目页面和python-mode页面上发布错误后,我发现在ipython.bat中提供参数console --matplotlib将使用matplotlib 1.3.1和ipython 1.2来完成这个操作 . 0

    这就是我在iphython.bat中的内容

    @ python.exe -i D:\ devel \ Python27 \ Scripts \ ipython-script.py console --matplotlib%*

相关问题