Problem running python/matplotlib in background after ending ssh session

后端 未结 4 575
长发绾君心
长发绾君心 2020-12-24 07:50

I have to VPN and then ssh from home to my work server and want to run a python script in the background, then log out of the ssh session. My script makes several histogram

4条回答
  •  暖寄归人
    2020-12-24 08:34

    It looks like you're running in interactive mode by default, so matplotlib wants to plot everything to the screen first, which of course it can't do.

    Try putting

    ioff()
    

    at the top of your script, along with making the backend change.

    reference: http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.ioff

提交回复
热议问题