Liangmin Li
Liangmin Li

Reputation: 71

Required vim compiled with +python

When I typed in raw and hit <C-x><C-o> in a python file, I get the Error:Required vim compiled with +python. But according to the result of command :version, there is a + rather than - in front of python, what should I do to fix this problem?

+arabic          +cursorbind      -footer          +mksession       +path_extra      +startuptime     +visual
+autocmd         +cursorshape     +fork()          +modify_fname    -perl            +statusline      +visualextra
-balloon_eval    +dialog_con      +gettext         +mouse           +persistent_undo -sun_workshop    +viminfo
-browse          +diff            -hangul_input    -mouseshape      +postscript      +syntax          +vreplace
++builtin_terms  +digraphs        +iconv           +mouse_dec       +printer         +tag_binary      +wildignore
+byte_offset     -dnd             +insert_expand   -mouse_gpm       +profile         +tag_old_static  +wildmenu
+cindent         -ebcdic          +jumplist        -mouse_jsbterm   +python/dyn      -tag_any_white   +windows
+clientserver    +emacs_tags      +keymap          +mouse_netterm   +python3/dyn     -tcl             +writebackup
+clipboard       +eval            +langmap         +mouse_sgr       +quickfix        +terminfo        +X11
+cmdline_compl   +ex_extra        +libcall         -mouse_sysmouse  +reltime         +termresponse    +xfontset
+cmdline_hist    +extra_search    +linebreak       +mouse_urxvt     +rightleft       +textobjects     -xim
+cmdline_info    +farsi           +lispindent      +mouse_xterm     -ruby            +title           -xsmp
+comments        +file_in_path    +listcmds        +multi_byte      +scrollbind      -toolbar         +xterm_clipboard
+conceal         +find_in_path    +localmap        +multi_lang      +signs           +user_commands   -xterm_save
+cryptv          +float           -lua             -mzscheme        +smartindent     +vertsplit
+cscope          +folding         +menu            +netbeans_intg   -sniff           +virtualedit

Thanks

Upvotes: 4

Views: 12724

Answers (2)

Eric
Eric

Reputation: 24866

For Ubuntu 16.04, after install the plugin, do following to fix the issue:

sudo apt-get install vim-gnome-py2

Upvotes: 0

baf
baf

Reputation: 4661

Features marked as */dyn may or may not be available. The support for these features is not built in. It depends on the presence of dedicated shared objects.

To some of the features "/dyn" is added when the feature is only available when the related library can be dynamically loaded.

To check if your vim can use a dynamic feature, e.g. python do:

:echo has('python')

It will print 0 (false) or 1 (true)

See also python-dynamic.

Update:

If you installed vim from source, you will have to rebuild it. Use --enable-pythoninterp, --with-python-config-dir options. Also make sure you have python development headers and libraries installed (devel package).

Upvotes: 3

Related Questions