0
我通过使用IPython的内核在远程机器上IPython的内核:与远程显示
[email protected]_machine$ ipython kernel
[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp] --existing kernel-24970.json
,然后通过手动ssh通道(见here)我的本地机器上连接qtconsole到它:
[email protected]_machine$ for port in $(cat kernel-24970.json | grep '_port' | grep -o '[0-9]\+'); do ssh remote_machine -Y -f -N -L $port:127.0.0.1:$port; done
[email protected]_machine$ ipython qtconsole --existing kernel-24970.json
这工作正常。但是,为了在调试时可视化我的数据,我想使用matplotlib.pyplot。尽管我已经启用X11转发我的SSH隧道(通过-Y),当我尝试绘制的东西,我得到以下错误:
TclError: no display name and no $DISPLAY environment variable
仿佛X11转发没有任何影响。
而且,一旦当我有访问到远程机器,我开始与远程内核:
[email protected]_machine$ ipython qtconsole
,并从我的本地机器重复相同的过程。这一次,我没有得到任何错误。但数字被绘制在远程机器上而不是我的本地机器上。
那么,有没有人知道是否有可能连接到远程ipython内核,并显示本地图? (请注意内联模式起作用,并在本地qtconsole中显示图,但这对我来说并不有用,因为我经常需要放大)。
cf还http://stackoverflow.com/questions/4706451/how-to-save-a-figure-remotely-with-pylab/4706614#4706614 –