I have a problem with the following setup:
- the volume of a remote machine is mounted using sshfs
- nvim is opened on the mounted volume to ensure all my plugins and settings work
- ~/anaconda3/envs/.. is interpreter path on the mounted volume I want to use
Unfortunately I can't get pyright to use the interpreter on the remote volume.
So far I tried:
return {
settings = {
python = {
pythonPath = "~/anaconda3/envs/env/bin/python3"
}
}
}
setting venvPath
and venv
in the pyright
language server config
return {
settings = {
python = {
venvPath = "~/anaconda3/envs",
venv = "clthesis"
}
}
}
configuring the global python host to
vim.g.python_host_prog = "~/anaconda3/envs/env/bin/python"
vim.g.python3_host_prog = "~/anaconda3/envs/env/bin/python3"
I know it's a finicky setup so any help appreciated
~
. Try specifying the absolute path or have lua expand it for you./home/<user>/anaconda3/envs/<env>/bin/python3
in both the pyright config and thehost_prog
's but unfortunately it still does not work.:checkhealth
shows ``` ## Python 3 provider (optional) - INFO: Using: g:python3_host_prog = "/home/<user>/anaconda3/envs/<env>/bin/python3" - WARNING: No Python executable found that canimport neovim
. Using the first available executable for diagnostics. - INFO: Executable: Not found ```g:python3_host_prog
point to the interpreter you expect? Did you install neovim for that interpreter? Besides, it's pyright you're configuring, not neovim itself, so unless pyright integrates with:checkhealth
(which I don't recall it does, but I may be mistaken), I wouldn't expect to be able to usecheckhealth
to see if pyright picked up the correct config.g:python3_host_prog
would do what I need. I alsopip install neovim
into the conda environment I want to use and the host_prog points to the correct interpreter. pyright is still not finding my package imports etc.:h provider
or simply pressK
while the cursor is overg:python3_host_prog
to see the documentation. It's used for python plugins, whereas pyright is a standalone language server that the built-in LSP client in nvim is communicating with.