Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim python support with non system python

Tags:

python

vim

I am trying to build vim with python support, but using a custom-built python somewhere in my $HOME directory (say $HOME/python2.6). Unfortunately, even giving --with-python-config-dir=$HOME/python2.6/lib/python2.6/config does not prevent vim configure to look into the python in /usr. Is there a way around that that does not involve hand editing makefiles ?

like image 339
David Cournapeau Avatar asked Dec 05 '11 19:12

David Cournapeau


People also ask

Can I use vim with Python?

Vim (source code), short for Vi IMproved, is a configurable text editor often used as a Python development environment. Vim proponents commonly cite the numerous plugins, Vimscript and logical command language as major Vim strengths.

Which Python is vim using?

Run :ve[rsion] in command-line mode or run vim --version from Bash. If vim was compiled with Python 3, you'll find -python and +python3 . If vim was compiled with Python 2, you'll find +python and -python3 . If vim was compiled without Python support, you'll find -python and -python3 1.

Is vim a good IDE for Python?

Vim (or NeoVim) is my favourite text editor / IDE. I love its extensibility, adaptability, and in-terminal slickness. Before I start, here's a quick guide on installing Neovim.


1 Answers

Just glancing at the configure file it looks like you can set the path to the python executable using an env var 'vi_cv_path_python'. So:

vi_cv_path_python=~/bin/python ./configure --enable-pythoninterp

Replacing ~/bin/python with the appropriate path for your install of course.

like image 99
nickmbailey Avatar answered Oct 03 '22 12:10

nickmbailey