ivanov/vim-ipython

Could not find IPython

nscott32 opened this issue · 2 comments

Hello,

After starting jupyter console in a terminal and trying :IPython in vim, I get the following error

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/kowa/.vim/plugged/vim-ipython/ftplugin/python/vim_ipython.py", line 109, in km_from_string
    raise ImportError("Could not find IPython. " + _install_instructions)
ImportError: Could not find IPython. You *must* install IPython into the Python that
your vim is linked against. If you are seeing this message, this usually means
either (1) installing IPython using the system Python that vim is using, or
(2) recompiling Vim against the Python where you already have IPython
installed. This is only a requirement to allow Vim to speak with an IPython
instance using IPython's own machinery. It does *not* mean that the IPython
instance with which you communicate via vim-ipython needs to be running the
same version of Python.

I installed vim with from my distrib repository (arch), do I have to rebuild vim ? How would I do that ?

Thank you

I believe you have different python versions in vim/jupyter.

vim-ipython only supports the ipython kernel started by the same version that vim was compiled.

I have vim with +python3 and jupyter 4.0.6 (with py3.5.1) and everything works (as long you change vim.ipy to call py3/python3 instead of py/python.

check my fork if you want something now that works in py3

Hey there, I'm going through old issues and it seems to me that it makes sense to close this one. The gist of it is that there is no requirement for having the same version of Python used by both jupyter and vim-ipython - just that vim-ipython needs to have IPython installed for the version of Python vim was linked against. Once that happens, it can speak the jupyter protocol to either the same or a different Python.

Thanks everyone and happy hacking! :bowtie: