vim-bootstrap icon indicating copy to clipboard operation
vim-bootstrap copied to clipboard

vim_bootstrap_updater.vim - 'cannot execute :python after using :py3'

Open kendricktan opened this issue 11 years ago • 11 comments

This is my first time reporting a bug, so please excuse any protocols that I've breached.

System: Fedora 22 LXDE, with python2, python2-devel, python3, python3-devel installed.

Anyhow, upon starting up with the pre configured vimrc it'll pop out the annoying message:

E836: This Vim cannot execute :python after using :py3
E263: Sorry, this command is disabled, the Python library could not be loaded.
line    5:
E836: This Vim cannot execute :python after using :py3
E263: Sorry, this command is disabled, the Python library could not be loaded.
line    6:
E836: This Vim cannot execute :python after using :py3
E263: Sorry, this command is disabled, the Python library could not be loaded.

Quick fix done via changing ~/.vim/bundle/vim-bootstrap-updater/plugin/vim_bootstrap_updater.vim

python import sys                                                        
python import vim                                                        
python sys.path.append(vim.eval('expand("<sfile>:h")')) 

to

python3 import sys
python3 import vim
python3 sys.path.append(vim.eval('expand("<sfile>:h")')) 

kendricktan avatar Oct 24 '15 10:10 kendricktan

This solution work for me. Thank's!

asfelix avatar Dec 02 '15 18:12 asfelix

This solution works for me too. thanks @kendricktan

cassiobotaro avatar Dec 14 '15 12:12 cassiobotaro

The above solution from @kendricktan just remove the vim errors at startup. But you will still face some errors if you try to enter :VimBootstrapUpdate into vim.

So this short patch file to allow VimBootstrapUpdate to work with python3 (Fedora 22). VimBootstrapUpdate.patch.zip

uggla avatar Jan 21 '16 10:01 uggla

This became a problem on ubuntu 16.04 LTS too, because now, python3 is default in vim.

cassiobotaro avatar Apr 24 '16 05:04 cassiobotaro

Is there a fix for this?, on ubuntu 14.04, changing python to python3 in vim_bootstrap_updater.vim does not fix the issue.

rahulunair avatar May 02 '16 15:05 rahulunair

@rahulunair but ubuntu 14.04 has python as default.

cassiobotaro avatar May 02 '16 15:05 cassiobotaro

This solution works to me on Ubuntu 16.04. Thx :)

mswell avatar May 03 '16 18:05 mswell

Someone has a solution for the problem? I try use the command :VimBootstrapUpdate and happens this below

Error detected while processing function VimBootstrapUpdate: line 23: E836: This Vim cannot execute :python after using :py3 E263: Sorry, this command is disabled, the Python library could not be loaded.

ffabiorj avatar May 20 '16 00:05 ffabiorj

This solution work for me. I'm running Ubuntu 16.04 anw. Thanks :)

afdallah avatar May 21 '16 07:05 afdallah

I used the neovim and works great after install the python support to neovim pip2 install neovim I guess needs only update the documentation

relson avatar May 31 '16 13:05 relson

@lerrua You can close this issue.

cassiobotaro avatar Jul 18 '16 17:07 cassiobotaro