I'm used to Ubuntu and know how to compile and edit vim. But how can i compile vim with python3 support on windows ?

Prefer to do it from the terminal. But i don't mind if i need to do it with miniGW if thats a better option.

1 Answer 1


You can find the instructions to build Vim on windows in the source file src/INSTALLpc.txt.

More specifically in the section 8. Building with Python3 support you can read:

8. Building with Python3 support

For building with MSVC 2008 the "Windows Installer" from www.python.org
works fine.  Python 3.6 is recommended.

When building, you need to set the following variables at least:

    PYTHON3:         Where Python3 is installed. E.g. C:\Python36
    DYNAMIC_PYTHON3: Whether dynamic linking is used. Usually, set to yes.
    PYTHON3_VER:     Python3 version. E.g. 36 for Python 3.6.X.

E.g. When using MSVC (as one line):

    nmake -f Make_mvc.mak
        PYTHON3=C:\Python36 DYNAMIC_PYTHON3=yes PYTHON3_VER=36

When using msys2 and link with Python3 bundled with msys2 (as one line):

    mingw32-make -f Make_ming.mak PYTHON3=c:/msys64/mingw64

(This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.)

You may also want to look at the instructions in src/INSTALL.txt

  • using make, as long as it's installed with MinGW, works as well. Also, in case anyone else gets stuck on the same problem: make needs to be executed in the src directory, not the root directory.
    – Zoe
    Commented Jul 1, 2019 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.