Running matplotlib or enthought.mayavi.mlab from the py shell inside emacs on windows

I can run the following code from a regular cmd shell:

  import matplotlib.pyplot as plt
 fig = plt.figure ()
 plt.show () 
It launches the matplotlib window.
However, running inside emacs using a shell or py shell: the buffer just hangs and the window does not start. Does anyone know what is going on here, or how to fix it? Thanks.
+2
source share
2 answers

got a job with ipython.el . had to add python26 \ scripts \ ipython.bat

  @ "c: \ Python26 \ python.exe" "-i" "c: \ Python26 \ scripts \ ipython.py" "-wthread"% *
and then in emacs:
  (setq ipython-command "c: /python26/scripts/ipython.bat")
 (require 'ipython)
 (py-shell) 
0
source

After a huge amount of time and posting the error on the matplotlib project page and python mode page, I found that providing console -matplotlib arguments in ipython.bat would do the trick with matplotlib 1.3.1 and ipython 1.2.0

This is what I have in my iphython.bat

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

0
source

Source: https://habr.com/ru/post/907423/


All Articles