File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,12 +77,25 @@ except NameError:
7777 kc = None
7878 pid = None
7979
80+ _install_instructions = " " " You *must* install IPython into the Python that
81+ your vim is linked against. If you are seeing this message, this usually means
82+ either (1 ) installing IPython using the system Python that vim is using, or
83+ (2 ) recompiling Vim against the Python where you already have IPython
84+ installed. This is only a requirement to allow Vim to speak with an IPython
85+ instance using IPython's own machinery. It does * not* mean that the IPython
86+ instance with which you communicate via vim - ipython needs to be running the
87+ same version of Python.
88+ " ""
8089def km_from_string (s = ' ' ):
8190 " ""create kernel manager from IPKernelApp string
8291 such as ' --shell=47378 --iopub=39859 --stdin=36778 --hb=52668' for IPython 0.11
8392 or just ' kernel-12345.json' for IPython 0.12
8493 " ""
8594 from os.path import join as pjoin
95+ try :
96+ import IPython
97+ except ImportError:
98+ raise ImportError (" Could not find IPython. " + _install_instructions)
8699 from IPython.config.loader import KeyValueConfigLoader
87100 from Queue import Empty
88101 try :
You can’t perform that action at this time.
0 commit comments