ipod825/vim-netranger

External command using python refers to python2

Closed this issue · 5 comments

Hi,
I can't copy from remote rclone shares. First, it said pathlib not found. It was already installed on python3, but not 2.
Then I installed it on python2, but it prints that there is a mismatch in pickle version (3 not supported).
I will copy the exact error later.

This plugin supports only python3. I don't know the exact cause that you vim can't import pathlib. In vim, the following should work without error
:py3 import pathlib

Otherwise, you should check your vim version, its python compatibility or g:python3_host_prog in neovim.

:py3 import pathlib works. the host is OK.
Why does it uses python2 , where PYTHONPATH and everything points toward python3? I get that it tries to use pickle in the directory of /usr/local/lib/python2.7/site-packages. pythonx version is OK.

Can you paste the error message? I don't remember that I use pickle in vim-netranger.

I see now the problem is here, called as a subprocess here, which in your case is python2 for whatever reason. I'll try to figure out how to refer to the python version used by vim.

This should be solved now. The external call to python is now forced to be the same as the one used by vim.