LeaderF icon indicating copy to clipboard operation
LeaderF copied to clipboard

To run install.sh correctly in pyenv installed python version

Open g6ai opened this issue 3 years ago • 2 comments

  • vim or neovim?
    • [x] vim
    • [ ] neovim
  • Output of vim --version or nvim --version:
  • Output of :echo has("python"): 0
  • Output of :echo has("python3"): 1
  • Output of :echo &pythondll(only vim, not neovim): /System/Library/Frameworks/Python.framework/Versions/2.7/Python
  • Output of :echo &pythonthreedll(only vim, not neovim): /Users/gbai/.pyenv/versions/3.8.6/lib/libpython3.8.dylib
  • Output of :py print(sys.version):
  • Output of :py3 print(sys.version):
    3.8.6 (default, Jan  7 2021, 18:42:00)
    [Clang 11.0.0 (clang-1100.0.33.17)]
    
  • Operating system:
    • [ ] Linux
    • [x] Mac OS X
    • [ ] Windows
    • [ ] Etc.
  • Configurations related to LeaderF in vimrc:
Plug 'Yggdroot/LeaderF', { 'do': ':LeaderfInstallCExtension' }
" LeaderF
let g:Lf_ShortcutF = "<leader>ff"
let g:Lf_WindowPosition = 'popup'
let g:Lf_PreviewInPopup = 1
let g:Lf_ShowDevIcons = 0

My complete vimrc is here.

Describe your question, feature request, or bug.

So I installed a python version with pyenv and use it as my Vim python3 dll, per steps in my wiki. But echo g:Lf_fuzzyEngine_C gives output 0. Turns out to be the install.sh was run with my system default python, not the pyenv version I use for my Vim.

I managed to resolve this problem, by (3.8.6 is the pyenv python version I use for Vim):

$ cd ~/.vim/plugged/LeaderF
$ ./install.sh --reverse
$ pyenv local 3.8.6
$ ./install.sh
$ pyenv local --unset

I want to share this with others, just in case. Thank you for making this brilliant plugin!

g6ai avatar Feb 07 '21 02:02 g6ai

@quark2019 宝友,这可不兴捧一踩一啊!不过谢谢知会。我在Neovim里用telescope.nvim

g6ai avatar Jun 07 '21 11:06 g6ai

LeaderF看起来无法和pyenv共同使用,会报各种各样的诡异错误,而除了LeaderF外其他插件全都可以正常使用。

环境: ubuntu20.04, vim: 8.2+, +python3; 从vim源码编译,编译时使用了pyenv中的Python 3.9.2 错误:只要启用了LeaderF, 保存个任意文件,都会有各种各样的诡异错误

自己不会配置怪别人。

Yggdroot avatar Jun 07 '21 13:06 Yggdroot