IPython Interactive Matplotlib Widgets Remote Server?

坚强是说给别人听的谎言 提交于 2020-01-05 04:40:27

问题


I am running an ipython server (for the notebook) on a remote linux machine. I have setup a profile that listens on the remote machine such that I can access locally using:

https://myserver:9999

This launches the standard IPython notebook interface that you would expect to see (after authentication). Everything works as expected.

Recently I have started using matplotlib widgets. These do not work in the notebook if using inline plots (the server just ships pngs). The simple fix on a local machine is to use ipython notebook --pylab and omit --inline.

In my IPython notebook profile I have commented out:

#c.IPKernelApp.pylab = 'inline'

and I launch with ipython notebook --pylab.

Login still works as expected, but if I use the %pylab magic to get started the kernel dies.

EDIT: The %pylab magic is redundant if I launch with --pylab

Is it possible to attain interactivity by not using inline plots in a remote login environment like this? I imagine that I need to tell the server that it is forwarding not only the port 9999 ipython data, but also needs to be forwarding X. Any insight appreciated.

Thanks.

Edit2: Crap....got it - my XServer on the local box had died....I can report that this functions as expected as long as you actually have a live XServer locally...crap.

来源:https://stackoverflow.com/questions/20405047/ipython-interactive-matplotlib-widgets-remote-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!