Question: I want to install a vim plugin, this plugin needs a `+python` feature, so when I open vim and type `:version` it displays `-python`. How can I make it enable?. 

Thanks.

Answer: 
You need to compile Vim yourself or get a prebuilt Vim package that was compiled with Python support. 

If you're on a Debian based system, the easiest way is to download the vim-gnome or vim-gtk package from `apt` (`apt install vim-gtk` for instance). Other distros might have a similar package with python support built in.

If you'd prefer to compile Vim yourself, download the Vim repository and pass in `--enable-pythoninterp` like so:

```
cd /tmp && git clone https://github.com/vim/vim.git && cd vim
./configure --enable-pythoninterp --prefix=/usr
make && sudo make install

```

On Windows, you can get the Gvim package from [here](https://github.com/vim/vim-win32-installer/releases/tag/v8.0.0003) which includes Python support.
If, like me, despite having compiled `vim` with `python3` support, you get an error that `python3` support is missing, make sure it loads the correct `dll`.

### Check feature exists

```
:version

```

```
...
+python3/dyn
...

```

### Python3 is missing during runtime

```
:echo has('python3')

```

```
0

```

### Incorrect DDL used

```
:verbose set pythondll?

```

```
libpython2.7.so.1.0

```

[This comment](https://www.reddit.com/r/vim/comments/7fyvgz/easiest_way_to_have_vim_with_python3_support_from/dqfh9gt?utm_source=share&utm_medium=web2x) deserves the credit for suggesting this option.

### Solution

Adding `set pythondll=libpython3.8.so` to .vimrc solved the issue by telling vim to use that `dll` when it needs `python3`. Vim's `:help python-dynamic` explains it

```
The 'pythondll' or 'pythonthreedll' option can be used to specify the Python       
shared library file instead of DYNAMIC_PYTHON_DLL or DYNAMIC_PYTHON3_DLL file      
what were specified at compile time.  The version of the shared library must       
match the Python 2.x or Python 3 version Vim was compiled with.

```

I couldn't find an explicit way to query what value `DYNAMIC_PYTHON3_DLL` was at compile time. At the time of this writing, I assumed it's the system's version.

### What is python3-dynamic (python3/dyn)

For those curious, this is included in `:help python-dynamic`, too.

```
On MS-Windows and Unix the Python library can be loaded dynamically.  The :version output then includes +python/dyn or +python3/dyn.                      

This means that Vim will search for the Python DLL or shared library file only  
when needed.  When you don't use the Python interface you don't need it, thus   
you can use Vim without this file.  

```