0

I spent all day yesterday backing up my hard drive, clean installing Mac OSX Yosemite, and now I'm trying to get all my stuff in order like it was before.

I have powerline installed properly (it shows up in tmux) but when I open vim, I get:

You need vim compiled with Python 2.6, 2.7 or 3.2 and later support for
Powerline to work...

I've tried:

brew uninstall python macvim
brew install python
brew install --override-system-vim macvim

here's the output from brew install python:

==> Downloading https://homebrew.bintray.com/bottles/python-2.7.9.yosemite.bottle.10.tar.gz
Already downloaded: /Library/Caches/Homebrew/python-2.7.9.yosemite.bottle.10.tar.gz
==> Pouring python-2.7.9.yosemite.bottle.10.tar.gz
==> Caveats
Pip and setuptools have been installed. To update them
  pip install --upgrade pip setuptools

You can install Python packages with
  pip install <package>

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

See: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md

.app bundles were installed.
Run `brew linkapps python` to symlink these to /Applications.
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
  rm '/usr/local/bin/2to3'

To force the link and overwrite all conflicting files:
  brew link --overwrite python

To list all files that would be deleted:
  brew link --overwrite --dry-run python

Possible conflicting files are:
/usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.4/bin/2to3
==> /usr/local/Cellar/python/2.7.9/bin/python -s setup.py --no-user-cfg install --force --verbose --insta
==> /usr/local/Cellar/python/2.7.9/bin/python -s setup.py --no-user-cfg install --force --verbose --insta
==> Summary
🍺  /usr/local/Cellar/python/2.7.9: 4810 files,  78M

and here's the output from brew install --override-system-vim macvim:

==> Downloading https://github.com/b4winckler/macvim/archive/snapshot-73.tar.gz
Already downloaded: /Library/Caches/Homebrew/macvim-7.4-73.tar.gz
  File "<string>", line 2
    print distutils.sysconfig.get_config_var("PYTHONFRAMEWORKPREFIX")
                  ^
SyntaxError: invalid syntax
==> ./configure --with-features=huge --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enab
==> make
==> Caveats
.app bundles were installed.
Run `brew linkapps macvim` to symlink these to /Applications.
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/view
Target /usr/local/bin/view
is a symlink belonging to vim. You can unlink it:
  brew unlink vim

To force the link and overwrite all conflicting files:
  brew link --overwrite macvim

To list all files that would be deleted:
  brew link --overwrite --dry-run macvim

Possible conflicting files are:
/usr/local/bin/view -> /usr/local/Cellar/vim/HEAD/bin/view
/usr/local/bin/vim -> /usr/local/Cellar/vim/HEAD/bin/vim
/usr/local/bin/vimdiff -> /usr/local/Cellar/vim/HEAD/bin/vimdiff
==> Summary
🍺  /usr/local/Cellar/macvim/7.4-73_1: 1810 files,  28M, built in 66 seconds

I tried ln -s /Applications/MacVim.app /usr/local/Cellar/macvim/7.4-73_1/, but it says the file already exists.

I'm scared to try any more linking/unlinking because, in addition to just having a bunch of junk on my 4 year old computer that I wanted to be rid of, I went through with the recent wipe and clean install because I broke the builtin Python unlinking stuff I shouldn't have.

By the way, here's my path:

aweeeezy$ echo $PATH
/Users/aweeeezy/anaconda/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:
/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/
Python.framework/Versions/3.4/lib/python3.4:/Library/Frameworks/Python.framework/Versions/
2.7/lib/python2.7:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

While trying to find a solution to this problem, the thought crossed my mind that I need to have a different Python at the front of my path, but a) this is how my path was before and Powerline still worked, and b) I want Anaconda Python at the front of my path so I can use IPython.

1 Answer 1

0

Since this post is months old I assume you've solved this problem on your own. For any other unfortunate souls, this is the best I can figure for now.

I can't comment on all the stuff you're asking about (powerline, etc) but - as a Mac/Vim user (new to Yosemite myself) the install is (or should be) super-simple. You can get a solid starter build with this:

Collect some info before you start:

which vim
/usr/bin/vim

vim --version | egrep --color 'VIM|Compiled|python|ruby|perl|tcl'

You'll see this is the Apple build. Next, install Vim

vim --override-system-vim --with-features=huge --disable-nls --enable-interp=lua,ruby,perl,python

--with-features=huge basically provides a full-blown install. --override-system-vim was aded because you had it in your example above. I do this as well. The Vim that comes on OS X is shameful.

Run these commands again:

which vim
/usr/local/bin/vim

vim --version | egrep --color 'VIM|Compiled|python|ruby|perl|tcl'

The output should change noticeably. Vim is in /usr/local/bin/ and it's not built by Apple. Everything you care about should have a plus sign next to it; e.g.: +ruby/dyn +python/dyn, etc.

On a side note: the prevalence of MacVim suggests that it's the thing that you should use. Do yourself a favor and abandon it for the real thing.

Use Vim in a real Terminal emulator; I just use Terminal.app, provided with OS X. From a very simple stand-point there are probably no notable differences. However, when you start flexing with Vim you'll notice huge pay-offs.

I hope this helps :-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .