vim Using Python for Vim scripting Check Python version in Vim


Vim has its own built-in Python interpreter. Thus it could use a different version of the default interpreter for the operating system.

To check with which version of Python Vim was compiled, type the following command:

:python import sys; print(sys.version)

This imports the sys module and prints its version property, containing the version of the currently used Python interpreter.