Shougo / defx.nvim

:file_folder: The dark powered file explorer implementation for neovim/Vim8
MIT License
1.17k stars 86 forks source link

defx requires Pyhon3 support("+python3") in MacVim on MacOS #287

Closed WisdomCui closed 2 years ago

WisdomCui commented 3 years ago

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

I'm getting this error on :Defx command run: [defx] defx requires Python3 support("+python3").

I use macvim and macvim's built-in TUI version of vim, pynvim is installed. I have followed the author's method to add the configuration file, but it does not seem to take effect in macOS. When I enter the command: echo has('python3’) in MacVim, the return value is still 0

Expected

MacVim should be able to run :Defx.

Environment Information

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

let g:python3_host_prog = expand('/opt/homebrew/Cellar/python@3.9/3.9.2/Frameworks/Python.framework/Versions/3.9/bin/python3')
set pythonthreehome=/opt/homebrew/Cellar/python@3.9/3.9.2/Frameworks/Python.framework/Versions/3.9/bin/
set pythonthreedll=/opt/homebrew/Cellar/python@3.9/3.9.2/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib

" Initialize plugin system
call plug#begin('~/.vim/plugged')
    " Display Vim Statues
    Plug 'vim-airline/vim-airline'
    " Display Weclome Interface
    Plug 'mhinz/vim-startify'
    Plug 'Shougo/defx.nvim'
    Plug 'roxma/nvim-yarp'
    Plug 'roxma/vim-hug-neovim-rpc'
call plug#end()

The reproduce ways from neovim/Vim starting (Required!)

  1. brew install python
  2. config .vimrc
  3. start macvim
  4. run :Defx
  5. Get Error

Screen shot (if possible)

46F087FE-3120-467D-80F7-7AE31DFF12E3 QQ20210221-1 QQ20210221-0 478419E59F2F293491A246EAD8AD1A91

Upload the log file

okcl commented 2 years ago

Make sure you have Python3 installed, the following answer also works with Python2.

Make sure you installed the nvim module python3 -m pip install --user --upgrade pynvim

Check for help :help provider-python

I solved mine (I use mac m1) with installing Python3.8 to usr/bin then changing my system language to english.

Shougo commented 2 years ago

It is not problem of defx.nvim...