Tuesday, April 2, 2019

Vim powerline plugin error

Hi,

I installed powerline-status as asked in documentation: pip3 install --user powerline-status

I am on OSX. I have both python2 and python3 installed.

When I try to open the vim, I get error:

——
vim .
Traceback (most recent call last):
File "<string>", line 9, in <module>
File "/Users/aruprakshit/.vim/bundle/powerline/powerline/__init__.py", line 11, in <module>
from powerline.lib.config import ConfigLoader
File "/Users/aruprakshit/.vim/bundle/powerline/powerline/lib/config.py", line 11, in <module>
from powerline.lib.threaded import MultiRunnedThread
File "/Users/aruprakshit/.vim/bundle/powerline/powerline/lib/threaded.py", line 7, in <module>
from powerline.lib.monotonic import monotonic
File "/Users/aruprakshit/.vim/bundle/powerline/powerline/lib/monotonic.py", line 19, in <module>
import ctypes
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 555, in <module>
_reset_cache()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 279, in _reset_cache
CFUNCTYPE(c_int)(lambda: None)
MemoryError
An error occurred while importing powerline module.
This could be caused by invalid sys.path setting,
or by an incompatible Python version (powerline requires
Python 2.6, 2.7 or 3.2 and later to work). Please consult
the troubleshooting section in the documentation for
possible solutions.
Error detected while processing /Users/aruprakshit/.vim/bundle/powerline/powerline/bindings/vim/plugin/powerline.vim:
line 157:
Traceback (most recent call last):
File "<string>", line 53, in <module>
File "<string>", line 9, in powerline_troubleshoot
File "/Users/aruprakshit/.vim/bundle/powerline/powerline/__init__.py", line 11, in <module>
from powerline.lib.config import ConfigLoader
File "/Users/aruprakshit/.vim/bundle/powerline/powerline/lib/config.py", line 11, in <module>
from powerline.lib.threaded import MultiRunnedThread
File "/Users/aruprakshit/.vim/bundle/powerline/powerline/lib/threaded.py", line 7, in <module>
from powerline.lib.monotonic import monotonic
File "/Users/aruprakshit/.vim/bundle/powerline/powerline/lib/monotonic.py", line 19, in <module>
import ctypes
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 555, in <module>
_reset_cache()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 279, in _reset_cache
CFUNCTYPE(c_int)(lambda: None)
MemoryError
Press ENTER or type command to continue



My ~/.vimrc looks like:

set nocompatible " required
set encoding=utf-8
filetype off " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" add all your plugins here (note older versions of Vundle
" used Bundle instead of Plugin)

" ...
Plugin 'scrooloose/nerdtree'
Plugin 'tmhedberg/SimpylFold'
Plugin 'tpope/vim-fugitive'
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
Plugin 'kien/ctrlp.vim'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'


" All of your Plugins must be added before the following line
call vundle

No comments: