I found this question which is very similar to the behavior I am experiencing – however I cannot make use of the answers offered, so I am repeating the issue here.
I have installed Emacs 29.3 on my Windows11 OS and Python through an Anaconda installation.
Launching python.exe
from a cmd
windows shell and inputting:
import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
plt.show()
I get the output I would expect, i.e. a plot window.
From within Emacs, I have updated the python-shell-interpreter
variable to contain the path to python.exe
, so after starting python-mode
I can C-c C-p
to run an interactive shell.
However, the exact same code leaves the shell hanging indefinitely and no plot window is created.
the interactive mode switch plt.ion()
call – again – works flawlessly from a vanilla windows shell but leaves the shell hanging when invoked from within the Emacs sub-shell.