Last active
August 29, 2015 14:26
-
-
Save vsobotka/5621c4285c81070575ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inspired by https://github.com/vinodpandey/blog/blob/master/vim7.3-centos-with-python-2.7.3-support.txt | |
# http://rm-rf.es/usrbinld-cannot-find-lpython2-6/ | |
# Install neccessary packages for both Python installation and Vim compilation | |
# ============================================================================= | |
sudo yum groupinstall 'Development Tools' | |
sudo yum install openssl-devel zlib ncurses ncurses-devel bzip-devel python-devel | |
# Missing python-devel will lead to /usr/bin/ld: cannot find -lpython2.6 | |
# Configure and install Vim | |
# ========================== | |
mkdir -p ~/temp | |
cd ~/temp | |
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 | |
tar jxvf vim-7.4.tar.bz2 | |
cd vim74 | |
./configure --enable-pythoninterp --with-features=huge --disable-selinux --enable-multibyte | |
# Attempting to compile with both py and py3 support resulted in +python/dyn +python3/dyn in vim --version, but :echo has("python") printed 0 | |
make | |
sudo make install | |
# Test | |
# ===== | |
vim --version | |
:echo has("python") | |
:python import sys; print(sys.version) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment