# Enabling python3 intrepreter in vim



## Vin Kum (Aug 20, 2015)

Hi,

I tried building editors/vim from the ports tree. `make config` has an option called PYTHON which one enabled compiles vim with --enable_pythoninterp option. I would like to compile it with --enable_python3interp option.

I tried various things like hard coding setting that option in MAKE_ARGS. I also tried various command line options such as WITH=PYTHON, set_editors_vim_OPTION=PYTHON. I also tried googling for a solution. I could not find anything.

I appreciate if you could help me. How do I enable python3 interpreter in my vim compile?

Thank you in advance.


----------



## kpa (Aug 20, 2015)

Try with these in your make.conf(5):


```
editors_vim_SET= PYTHON
.if ${.CURDIR:M*/editors/vim}
PYTHON_VERSION=python3.3
.endif
```

Change the PYTHON_VERSION if you want a different version of Python3, for example python3.4.

The syntax for setting options was changed recently or more precisely the old way of doing it got dropped. Now you have to use:


```
${OPTIONS_NAME}_SET= OPTION1 OPTION2
${OPTIONS_NAME}_UNSET= OPTION3
```

The value of ${OPTIONS_NAME} for port can found by running this on the port directory:

`make -V OPTIONS_NAME`

For editors/vim the value is editors_vim as above.


----------

