1

I'm running my code remotely using ssh -X command, but the prompt tells me to Press Ctrl+C to stop WebAgg server anytime the code gets to a plot command, and so my plot doesn't show at all. Is there a way to fix this? I have set matplotlib.use('TkAgg'), but it doesn't correct it either. Thanks

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
user9404237
  • 149
  • 8
  • I am still struggling with this after several hours so I'm not able to answer. You don't say whether or not you know that you have Xauth set up correctly. [This](https://hpc.llnl.gov/software/development-environment-software/x-terminal-control-xauth) tutorial helped me. Many others are struggling, with answers of the form "this worked for me" being provided but none of them working for me. In that vein, `matplotlib.use('Agg')` didn't work for me but it stopped the `Press Ctrl+C` notice. [Also...](https://stackoverflow.com/questions/3453188/matplotlib-display-plot-on-a-remote-machine). – Mike O'Connor Jul 26 '18 at 08:15
  • I finally beat this. I'm using `TkAgg` and the trick for me, as I am using Python3.6, was to first `sudo apt install python3.6-tk`, as it didn't automatically come with my Ubuntu server 18.10 installation. That takes care of the `tk` business. The second thing was to make sure that the remote computer's `ssh_config` file contained `X11Forwarding yes`, per the instructions of Gilles [here](https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely). – Mike O'Connor Oct 05 '18 at 14:23

0 Answers0