eglot, pyright and docker not working well #828
Unanswered
nettoyoussef
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I am able to set up pyright inside docker, but only with the npm version (the
pip
version is not installing thepyright-langserver
command for some reason).So, inside the container I have to install both npm (
apt install npm
), and then, pyright (npm -g install pyright
).Using this method, once inside the container,
eglot
is able to open the language server using bothtramp
anddocker-tramp
.For example:
/docker:root@container:/path/on/the/container
.However no help documentation is available with this server, while, with the same process, they are with the
pylsp
server.Basically, I get "Import could not be resolved" for most libraries.
This is probably a configuration problem regarding paths.
Since I am using an Ubuntu image, my user's python is on
/usr/local/bin/python3
, and I think pyright is using theimage system-wide python installation on
/usr/bin/python3
(which leads to not resolving the imports).I am using the official docker image
python:3.9.7
.Any suggestions on what should I try to make this work?
Beta Was this translation helpful? Give feedback.
All reactions