mjrodgers / pulsar-ide-python

Python language support for Atom-IDE :atom: :snake:
https://web.pulsar-edit.dev/packages/ide-python
MIT License
7 stars 3 forks source link

Unable to start the Python language server. #4

Closed unix1024 closed 11 months ago

unix1024 commented 1 year ago

image

when I use the package, I get this error, please, how to solve the problem?

I try the way of the issue:https://github.com/atom-community/ide-python/issues/34, but it doesn't work

SvenMoenig commented 1 year ago

I have the same issue. It seems that this package tries to use the module "pyls" instead of "pylsp" despite being configured to use "pylsp" and not "pyls".

SvenMoenig commented 1 year ago

removing the code that decides whether to use "pyls" or "pylsp" fixes this issue for me. I created a pull request with this change (#5)

faraggi commented 1 year ago

I am getting this error as well, but its due to using Ubuntu 23.10 since it uses Externally Managed Environments.

How can use this package and install it on a venv, is there a setting for that?

(This would also happen in 23.04 and every other externally -managed-environment distro.)

SvenMoenig commented 1 year ago

How can use this package and install it on a venv, is there a setting for that?

Activate the virtualenv in your shell, then install the pip package with its pip. By default activating the venv should override the pip (and python) command for as long as the venv is active.

When the pip package is installed in the venv, you need to adjust the python binary used to that of the venv. You can find out its path by activating the venv in your shell and using the command "which python".

faraggi commented 1 year ago

Super helpful, thanks!

mesub7 commented 10 months ago

I experienced the same thing and tried all the steps here (and elsewhere). My own issue was that one of my file names (queue.py) was shadowing one of the key files (which meant the language server errored out and didn't start) Make sure that your files aren't shadowing any of the key files!