[Tutor] Enable Python feature in vim editor
Cameron Simpson
cs at cskk.id.au
Sun Nov 28 18:24:26 EST 2021
On 24Nov2021 22:45, Kaushal Shriyan <kaushalshriyan at gmail.com> wrote:
>I am running CentOS Linux release 7.9.2009 (Core) and have enabled
>below
>entry in .vimrc file
>
>$cat .vimrc
>set shiftwidth=2
>set shiftround
>set tabstop=4
>set softtabstop=4
>set noexpandtab
>set number
>set ruler
>set noautoindent
>set nosmartindent
>set noincsearch
>syntax enable
>$
>
>when i do vim testpythonscript.py I am facing the below Pymode error
>
>$vim testpythonscript.py
>
>[Pymode]: error: Pymode requires vim compiled with +python3 (exclusively).
>Most of features will be disabled.
This means that the vim you're invoking does not have the "python3"
feature compiled into it. Indeed, in the `vim --version` output you
include there is this:
$vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 15 2020 16:44:08)
Included patches: 1-207, 209-629
Modified by <bugzilla at redhat.com>
Compiled by <bugzilla at redhat.com>
Huge version without GUI. Features included (+) or not (-):
[...]
+cryptv +linebreak +python/dyn +viminfo
+cscope +lispindent -python3 +vreplace
[...]
So you can see that "python3" has been omitted from that build.
Do a "yum search vim" and see if there is a vim variant with "python3"
included (I haven't got a Centos host available to me). You could try
replacing the installed vim with the python3 enabled vim if that is
available.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Tutor
mailing list