The story of Windows.
Since the Python environment usually relies on Anaconda, I would naturally like to refer to Anaconda's Python 3.5 as Vim's Python 3 interface, but since the versions of VC10 (Vim), VC14 (Anaconda) and VC are different, gVim to Anaconda When I try to use python35.dll
, it crashes when Vim starts and I can't.
Compiling Vim with VC14 might solve the problem, but it's hard to use the binaries distributed by Kaoriya, so I installed a non-Anaconda plain Python (VC10 here) separately to overcome it.
However, Anaconda is overwhelmingly convenient and doesn't use plain Python, so I don't want to install it if possible.
https://www.python.org/downloads/windows/ Download the ** Windows x86 embeddable zip file ** distributed above and Place the following two files in the Vim installation directory.
python35.dll
python35.zip
It's a kind of installation, but it only puts two files and doesn't need to be compiled or passed. Now you can use the Python interface.
I also have netupvim
, diff
, and pt
, so I don't care if the Vim directory gets dirty at this time.
After that, as before, set ftplugin / python.vim
so that Anaconda can be seen from jedi.vim
, referring to here.
http://qiita.com/repli/items/2bc6986f0be94555348a
For Mac, do brew install python3
and
Set pythonthreedll
and pythonthreehome
.
.vimrc
if has('vim_starting')
if has('macunix')
" brew install python3
set pythonthreedll=
\/usr/local/Cellar/python3/3.6.4_2/
\Frameworks/Python.framework/Versions/3.6/Python
set pythonthreehome=
\/usr/local/Cellar/python3/3.6.4_2/
\Frameworks/Python.framework/Versions/3.6
elseif has('win32')
"Download the embed version of python and put it in the same folder as vim.
" python35.dll
" python35.zip
endif
endif
Recommended Posts