Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check python version that vim was compiled with?

Tags:

python

vim

In the terminal, it works to do

python -c "import sys; print(sys.version)" 

but doing

:python -c "import sys; print(sys.version)" 

in vim throws a SyntaxError.

like image 522
beardc Avatar asked Jun 02 '12 16:06

beardc


People also ask

How do I check my Python version?

Press CMD + Space to open Spotlight. Type “ terminal ” and press enter. Execute command : type python ‐‐version or python -V and press Enter . The Python version appears in the next line below your command.

How do I know vim version?

You can also just open a blank VIM document by typing vi or vim in your terminal. The welcome screen will state your version as well as other information.

How do I list all the versions of Python installed?

The Pip, Pipenv, Anaconda Navigator, and Conda Package Managers can all be used to list installed Python packages. You can also use the ActiveState Platform's command line interface (CLI), the State Tool to list all installed packages using a simple “state packages” command.

Does vim require Python?

Even back in 12.04, the vim package depended on Python (2.7 at the time). This supports Python scripting inside Vim. which shows no python3 requirement.


1 Answers

I just discovered here that you can also do it with

:python import sys; print(sys.version) 
like image 55
beardc Avatar answered Sep 22 '22 12:09

beardc