huggie
huggie

Reputation: 18237

Compile vim with python 2.0 support

I follow the instruction here to compile Vim with Python 2.x support on Mac OS because I want the Vim plugin YouCompleteMe

In configure it says:

checking for python2... (cached) /Users/t2wu/miniconda3/bin/python
checking Python version... (cached) 
checking Python is 2.3 or better...   File "<string>", line 1
    import sys; sys.exit( < 2.3)
                          ^
SyntaxError: invalid syntax
too old

It can't be too old. I wonder why it is checking out miniconda3 which has Python 3.3 installed (System /usr/bin/python is on version 2.7.5.) I've removed that directory from the PATH environmental variable from .bash_profile just because I want to compile this, but in general I want Python 3 to be accessible.

Upvotes: 0

Views: 840

Answers (2)

logc
logc

Reputation: 3923

There are some alternatives. Personally, I installed Vim on Mac OS X using MacPorts. After downloading and installing graphically the port command, you can use the following from command line to install vim with support for Python 2.7:

$ sudo port install vim +python27

Notice that this also installs a Python 2.7 interpreter from MacPorts.

The advantage of this approach is that MacPorts will bring you updates to the Vim package, and you keep the system Python unmodified.

Upvotes: 1

romainl
romainl

Reputation: 196456

YOU DON'T NEED TO DO ANY OF THAT.

You only need to install MacVim which comes with python support built-in. It will work out of the box if Python is correctly installed on your system.

Upvotes: 0

Related Questions