Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Mac OSX 10.8.2 (Fails to load properly) #39
In Mac OSX 10.8.2 im unable to get powerline to work, it bails everytime vim lauches with the following error:
Error detected while processing /Users/wbroach/.vimrc:
I can verify that the module is in fact installed:
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
It can be found in the following location on my system:
Im using just a plain blank .vimrc with just one line, shown below:
python from powerline.ext.vim import source_plugin; source_plugin()
My sys specs are as follows:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 16 2012 15:12:57)
I can verify that vim is in fact using the correct python version that the module is installed to
:python import sys
python import sys; print(sys.path)
['/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-darwin', '/usr/lib/python2.7/plat-mac', '/usr/lib/pyt
It was missing the following path: /Library/Python/2.7/site-packages
I added this: python import sys; sys.path.append("/Library/Python/2.7/site-packages")
This is a fresh new install of OSX, This might want to get added to the readme somewhere as to help those who run into this same issue on OSX.
It shouldn't really be necessary to manually append the path if you've installed the package system-wide, but if you installed it local to your user it may act differently on OS X. Anyways, I'll add some info about this to the troubleshooting section of the docs for others who may run into the same issue.
I had this problem too and got it resolved.
System Vim and System Python
$ port select python Available versions for python: none (active) python25-apple python26 python26-apple python27 python27-apple
System Vim and MacPorts' Python
$ sudo port select python python27 Selecting 'python27' for 'python' succeeded. 'python27' is now active.
This is not a system-wide python.
System Vim and Apple's Python
$ sudo port select python python27-apple Selecting 'python27-apple' for 'python' succeeded. 'python27-apple' is now active.
This should work.
MacVim and any version Python
This should work too.
I had the same issue. I'm using the system installed version of Python (2.7). Not homebrew.
# file /Library/Python/2.7/site-packages/powerline/ext/vim/powerline.vim /Library/Python/2.7/site-packages/powerline/ext/vim/powerline.vim: ASCII Java program text
:python import sys; print(sys.path) ['/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-darwin', '/usr/lib/python2.7/plat-mac', '/usr/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/Extras/lib/python', '/usr/lib/python2.7/lib-tk', '/ usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload']
Adding the following line above the powerline import in my vimrc fixed the issue:
python import sys; sys.path.append("/Library/Python/2.7/site-packages")
That's probably because you installed a seperate python (via brew or
$ which python
Also sounds like you have /usr/local/bin in front of /usr/bin in you PATH.
OSX by default does not use /usr/local, 3rd party products like brew use
On Sunday, January 20, 2013, Anthony Cook wrote:
I did specify brew. Either way, this plugin is extremely finicky at this stage. And its worse if you're not a python developer, but have been using Powerline for a long time. Pretty much everything has to be ripped out and started over.
I wrote up my experiences getting the Vim (MacVim and Ubuntu commandline) module working, hopefully it helps someone else:
referenced this issue
Jan 22, 2013
added a commit
Jan 22, 2013
I have an ImportError too and nothing works for me :
In vimrc :
OS X 10.7.5, python (homebrew)
I was able to get this up and running successfully this morning, so I thought I would share the process.
I have it running with:
I used the latest nightly release from here: http://iterm2.com/nightly/latest
I decided to try using Homebrew's version --
I used a brew for this as well, using part of the install command in the docs. The brew for Vim requires Mercurial, but there wasn't anything special about that install.
As others have noted, Homebrew installs things into
After making sure that the version of Python in my path was the correct one (
I hope someone finds this helpful.
In case you're compiling Vim yourself, here's the big features list from my compile:
Huge version without GUI. Features included (+) or not (-): +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent -clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm +mouse_sgr -mouse_sysmouse +mouse_urxvt +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg +path_extra -perl +persistent_undo +postscript +printer +profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
referenced this issue
Feb 17, 2013
I got Powerline running in Vim this evening using:
Similar to carwin, I used brew to install Python 2.7.3, Mercurial, and standard Vim (not MacVim). Homebrew requires /usr/bin/local to be at the start of your path so that brew installs override anything else.
Installed Powerline via pip:
Now here's what I had to fix, the Powerline bindings filenames changed. Add this to .vimrc:
This got Powerline enabled in Vim, but I'm still having issues with the fonts. I do have the most recent patched version of Menlo for Powerline, and it works fine for the Powerline-inspired "agnoster" zsh theme. UTF-8 is set across the board, and iTerm2 is using the font.
Patching Menlo manually with fontforge from brew, and my system's Menlo font has fixed the fonts issue with Vim Powerline... my agnoster theme is no longer functioning properly. Strange.
Also, I was able to uninstall Powerline via pip and install it using Vundle, still working now.
Edit: I've fixed the agnoster oh-my-zsh theme to use the Powerline beta glyphs.
Using: Mountain Lion, MacVim and Homebrew
For me the problem was the Homebrew MacVim was not building against the Homebrew Python even with the Python flags set. This http://superuser.com/a/440982 post solved that problem for me by hacking the install script. I made the changes to my MacVim Homebrew install script and reinstalled it with the following command.
brew reinstall macvim --env-std --override-system-vim
And in my
And in my
set guifont=Inconsolata-dz\ for\ Powerline:h12
Hi all. I pushed an update to Homebrew and now MacVim (and Vim in another commit) both build against system and against a (newer) brewed python. Brewed Python is preferred, if available. I tested the python bindings with powerline and works great for me now. We assume that this is a upstream issue with how (Mac)Vim builds on OS X, so now we pass
Downside is that we had to disable
Oh, and don't rename anything in
But the good is
referenced this issue
Jun 11, 2013
When trying to install Powerline, it complained with
I am running on 10.8.4 using a brew-installed Python 2.7.5.
The solution was simple and is documented on http://stackoverflow.com/questions/4495120/combine-user-with-prefix-error-with-setup-py-install