maralla / completor.vim

Async completion framework made ease.
MIT License
1.27k stars 63 forks source link

Python import error / installation error #231

Closed chrisjhunter closed 5 years ago

chrisjhunter commented 5 years ago

I installed completor.vim with vim-plug

Plug 'maralla/completor.vim'
let g:completor_gocode_binary = '/Users/chunter/go/bin/gocode'
let g:completor_python_binary = '/usr/bin/python'

But I am getting the following error, output from :messages

line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named completor
Error detected while processing function <lambda>7[1]..completor#do[9]..completor#utils#get_completer:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'completor_api' is not defined
line    2:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'res' is not defined
E858: Eval did not return a valid python object

I followed along with most of the troubleshooting steps in this issue - https://github.com/maralla/completor.vim/issues/201

But the resolution would be different, since I am not using anaconda

Additional info

vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2017 01:31:35)
MacOS X (unix) version
python -V
Python 2.7.10

vim -c ":py import completor;print('ok')" -c "qall" -T dumb

Error detected while processing command line:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named completor

output from :scriptnames

 64: ~/.vim/bundle/completor.vim/autoload/completor.vim
 65: ~/.vim/bundle/completor.vim/autoload/completor/action.vim
 66: ~/.vim/bundle/completor.vim/autoload/completor/utils.vim

I have run all these tests with other plugins disabled

chrisjhunter commented 5 years ago

so ... I have solved this by re-installing vim with the --with-python@2 flag brew upgrade vim --with-python@2

on Macbook Pro 2014 - macOS Sierra ver 10.12.6

16.7.0 Darwin Kernel Version 16.7.0: Tue Jan 30 11:27:06 PST 2018; 
root:xnu-3789.73.11~1/RELEASE_X86_64 x86_64

if I can figure out how to do that in RHEL6/7, I'll update this issue