在启动过程中调用魔术ipython
时,我收到了一个令人讨厌的警告,它挂起了ssh -X
会话(由%pylab
连接)。
这是负责的行:
get_ipython().magic(u"%pylab")
在ipython配置文件中
~/.ipython/profile_default/startup/00-first.py
这是命令的样子
$ ssh -X myIP
$ ipython
Python 3.7.3 | packaged by conda-forge | (default,Jul 1 2019,21:52:21)
Type 'copyright','credits' or 'license' for more information
IPython 7.9.0 -- An enhanced Interactive Python. Type '?' for help.
Using matplotlib backend: Qt5Agg
Populating the interactive namespace from numpy and matplotlib
#...hangs here for 10 seconds... and finally:
WARNING: your terminal doesn't support cursor position requests (CPR).
In [1]:
奇怪的是,如果我删除文件并在ipython中调用%pylab
,它仍会挂起相同的持续时间,但未显示警告。
这可以解决吗?
我的安装:
Python 3.7.3
IPython 7.2.0
matplotlib 3.1.1
qt 5.12.5
pyqt 5.12.3