Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on Arch Linux with pyenv #14

Open
superlou opened this issue Apr 14, 2023 · 8 comments
Open

Not working on Arch Linux with pyenv #14

superlou opened this issue Apr 14, 2023 · 8 comments

Comments

@superlou
Copy link
Owner

          It there anyone can set this up now? i try to install python-lsp-server on my system, in a virtualvenv, it just show not thing to me

I'm using Arch Linux and pyenv? Maybe that's the problem?

Originally posted by @ppvan in #13 (comment)

@superlou
Copy link
Owner Author

Are you starting lapce from within the virtual environment? If run pylsp --version in the virtual environment, what is the output?

@ppvan
Copy link

ppvan commented Apr 14, 2023

I'm install pylsp on my system and test it in lapce with simple main.py (No venv at this point)
Not thing show up, i tried pylsp --help and kinda sure that's it on my PATH and working
Then i try to reinstall every thing in venv, activate it from terminal and see what's going
I don't get the start lapce in venv part? How can i do that? If i start lapce from terminal, it just start and lapce show up (just like in the background, no output)

Finally, pylsp --version output pylsp v1.7.2

@ppvan
Copy link

ppvan commented Apr 14, 2023

This thing is strange to me, start lapce from terminal looks like this
image

@ppvan
Copy link

ppvan commented Apr 14, 2023

@superlou I'm getting this thing to work now, with a bit of manual labor

  1. Open terminal, go to project directory and activate the python virtualenv
  2. Start lapce from terminal, in venv shell
  3. Autocomplete works now

But it doesn't seem to work in system pip, that's not matter because every one work in venv. But i'm really expect it to detect my venv or allow me to set Python interpreter.

@superlou
Copy link
Owner Author

@ppvan, right now, I think those steps are how I expect it to work if you have a non-system configuration in the venv. It does work on my Linux Mint and Windows 10 computers using the system python3 environment. The plugin doesn't have any intelligence to detect the presence of a venv, other than having Lapce started within the venv.

@ppvan
Copy link

ppvan commented Apr 17, 2023 via email

@Packman28334
Copy link

I can confirm it works on Arch Linux only when Lapce is started from the venv.

I also tested installing the package from pipx, which puts pylsp on PATH and allows the command to work outside of the venv, but the language server still does not start in Lapce. Of course, supporting the pipx version wouldn't solve the issue of Lapce not supporting different interpreters, and the modules exclusively in the venv wouldn't have intellisense, but it would at least be an interim solution to point people to until it's updated. Having intellisense for just stock modules is still better than no intellisense at all.

@superlou
Copy link
Owner Author

Are there other Lapce LSP plugins that work with venvs? Maybe we could get some inspiration from those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants