Execute different version of python in .vimrc file
Question: I am trying to get powerline.vim to work and the problem is that on setup it
is trying to run the wrong version of python. This line is causing the
problem.

    
    
    python from powerline.ext.vim import source_plugin; source_plugin()
    

How can I change this so that it executes `/usr/local/bin/python` instead?

Thanks!


Answer: You can't. Because you are **not** using _/anything_`/bin/python`. The vim
binary is linked to the python interpreter library directly.

The library is called `/usr/lib/libpythonX.Y.so.Z`. E.g.
`/usr/lib/libpython2.7.so.1`. It's a shared library, so you could use newer
version of it (e.g. changing library paths), but only one that has the same
numbers (X, Y and Z). So you can use python 2.7.3 instead of python 2.7.0, but
to use python 2.7.3 instead of python 2.6.2, you'll have to recompile vim.

But I suspect you are just trying to do the things the wrong way around. You
should simply try installing powerline into the python version vim uses.

