question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pip installation not working with python language server

See original GitHub issue

Hello! Thank you very much for this project and the great work. 😃

Description

I was trying to create an environment as described in the readme using the pip installation of python language server, but it doesn’t work for me. The only way it works is if I install conda install -c conda-forge python-language-server.

Reproduce

  1. Follow steps 1 through 6 on README file.
  2. Run jupyter lab on terminal Get the following result:
-2020-05-24 17:01:33,673 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'autopep8': No module named 'autopep8'                          
2020-05-24 17:01:33,678 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'mccabe': No module named 'mccabe'
2020-05-24 17:01:33,679 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'pycodestyle': No module named 'pycodestyle'
2020-05-24 17:01:33,680 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'pydocstyle': No module named 'pydocstyle'
2020-05-24 17:01:33,680 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'pyflakes': No module named 'pyflakes'
2020-05-24 17:01:33,681 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'pylint': No module named 'pylint'
2020-05-24 17:01:33,682 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'rope_completion': No module named 'rope'
2020-05-24 17:01:33,682 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'rope_rename': No module named 'rope'
2020-05-24 17:01:33,683 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'yapf': No module named 'yapf'

Context

  • Operating System and version: ArchLinux
  • Browser and version: Firefox 76
  • JupyterLab version: the one indicated on readme

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bollwyvlcommented, May 24, 2020

Thanks for testing it out!

A pip freeze would help, as well.

Perhaps try:

pip install --upgrade python-language-server[all]

… perhaps we should encourage that as a default.

I am very pro-entry_points, and we even support discovery of language server specs with them on the backend of this repo, but this experience with pyls has soured me on them some.

I don’t understand why it ships broken-by-default. Theoretically, It can be configured but we don’t have that up and running yet yet (#245), and it probably still would be it broken at startup time as I still haven’t figured out how to check in a pyls configuration on a project.

The reason the conda-forge one works: on python-language-server-feedstock, it’s basically packaged with [all], and pip checked before distribution, which is why it works predictably… albeit verbosely since it tries to load everything.

1reaction
krassowskicommented, May 24, 2020

Thank you for your feedback! The warnings that you see are not errors by themselves - those barely indicate that additional extensions of python-language-server cannot be loaded as the extra (optional) dependencies are not installed.

To install all the optional pyls extensions with pip you would need to run: pip install 'python-language-server[all]'. I suspect that the conda option may just install everything by default. Please head over to pyls README for more details.

We may want to mention this in our README, but then this information is easily accessible from in the pyls repository - and we already recommend to check out the websites of the servers you install:

Note: it is worth visiting the repository of each server you install as many provide additional configuration options.

Does it make sense?

@bollwyvl 7 seconds difference 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

python-language-server - PyPI
Installation. The base language server requires Jedi to provide Completions, Definitions, Hover, References, Signature Help, and Symbols: pip install python ...
Read more >
python-language-server[all] not working if installing with pip3
It does with python -m pip install python-language-server[all]. I have faced this problem in other packages, could someone explain ...
Read more >
Unable to start the Python language server - Stack Overflow
It's a bug in python-language-server . I just reported it. Meanwhile you can try using pip install --no-binary to install ...
Read more >
Installation - Jupyter[Lab] Language Server Protocol
However, if you feel proficient with using Python package managers such as pip and conda you may prefer to follow the custom installation...
Read more >
Settings Reference for Python - Visual Studio Code
Specifies what code files the language server analyzes for problems. Available values are workspace and openFilesOnly . include, [], Paths of directories or ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found