Use embeddable Python as Vim's Python 3 interface

problem

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.

Correspondence

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.

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.

Other

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

Use embeddable Python as Vim's Python 3 interface
Use pymol as a python library
Use fabric as is in python (fabric3)
Use blender as a python module
Resolve Vim's Python interface path issue
Use Azure ML Python SDK 2: Use dataset as input-Part 2
Use python in Docker container as Pycharm interpreter
Use thingsspeak from python
Use config.ini in Python
[Python] Use JSON with Python
Use fluentd from python
Use dates in Python
Use Valgrind in Python
Use mecab with Python3
Use LiquidTap Python Client ③
Use DynamoDB with Python
Use Python 3.8 with Anaconda
[Python] format methodical use
Use python with docker
Use MySQL from Python
Use LiquidTap Python Client ②
Specify MinGW as the compiler to use with Python
Use BigQuery from python.
Use profiler in Python
Use mecab-ipadic-neologd from python
Use LiquidTap Python Client ①
[Python] Use JSON format data as a dictionary type object
Let's use def in python
Let's use python janome easily
Use Trello API with python
Use matplotlib on Ubuntu 12 & Python
Use let expression in Python
Use Measurement Protocol in Python
python3: How to use bottle (2)
Use callback function in Python
Use Twitter API with Python
Use parameter store in Python
[Python] Use a string sequence
[Python] How to use list 1
Use HTTP cache in Python
Use TUN / TAP with Python
Use MySQL from Anaconda (python)
Use MongoDB ODM in Python
Use list-keyed dict in Python
How to use Python argparse
[Python] Theremin interface with mouse
Use Random Forest in Python
Use regular expressions in Python
Use Remotte as a user
Python: How to use pydub
Use subsonic API with python3
Use Python on Windows (PyCharm)
[Python] How to use input ()
How to use Python lambda
[Python] How to use virtualenv
python3: How to use bottle (3)
python3: How to use bottle
Use e-Stat API from Python
How to use Python bytes
python: Use the variables defined in the string format as they are
Use youtube_dl as a python module. appendix) Nico Nico Douga HTTP 403 error