-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mac OSX 10.8.2 (Fails to load properly) #39
Comments
That's strange. What's the output when you run this inside vim:
|
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 |
Works now. 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 did check to make sure that powerline was in fact installed system-wide, It seems as though on a new installation of Mac OSX 10.8.2 Mountain Lion that the '/Library/Python/x.x/site-packages' is not in the PYTHONPATH for vim by default. |
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 in /usr/bin/vim:
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 with homebrew-installed python. I had to add |
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 from vim: :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") |
I had to add this to get mine to work: python import sys; sys.path.append("/usr/local/lib/python2.7/site-packages/") OSX Lion, brew, macvim. I tried the above approaches and wasn't able to get it working. |
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: |
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:
iTerm2I used the latest nightly release from here: http://iterm2.com/nightly/latest PythonI decided to try using Homebrew's version -- VimI 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.
Modified $PATHAs others have noted, Homebrew installs things into
Installing PowerlineAfter 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 |
carwin, followed your steps. when i try to start Vim I get:
Any thoughts? |
Same as above. |
fixed with 8b8de32 |
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 set rtp+=~/.janus/powerline/powerline/bindings/vim 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 |
That's great. Thanks for the effort @samueljohn. 👍 |
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 Cheers |
I got the powerline (kinda) working, but not the zsh bindings. When I source the powerline.zsh file I get a command not found error: zsh: command not found: powerline |
If you use brew to install python, you can just run without the |
Yes, see my comment there #552 (comment) |
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:
line 1:
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named powerline.ext.vim
I can verify that the module is in fact installed:
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
It can be found in the following location on my system:
/Library/Python/2.7/site-packages/Powerline-beta-py2.7.egg/powerline/ext/vim/powerline.vim
/Library/Python/2.7/site-packages/powerline/ext/vim/powerline.vim
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)
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
I can verify that vim is in fact using the correct python version that the module is installed to
in vim:
:python import sys
:python print(sys.version)
2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)]
Press ENTER or type command to continue
Please advise
The text was updated successfully, but these errors were encountered: