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

Unable to start subprocess for LSP-pylsp - Python binary not found #163

Closed
Archer6621 opened this issue Apr 9, 2024 · 2 comments
Closed

Comments

@Archer6621
Copy link

Archer6621 commented Apr 9, 2024

Hey, I'm trying to run LSP-pylsp in ST4 (Build 4169) on Windows 11, but I'm unable to get it to start. Regardless of where I point the python_binary variable to in the global config (not the project-specific one), or even leaving it empty, it always greets me with the same dialog:

image

I have Python 3.12.2 installed and it works fine with everything else, including pyright.

In the console I get:

Traceback (most recent call last):
  File "C:\Users\shaad\AppData\Roaming\Sublime Text\Installed Packages\LSP.sublime-package\plugin/core/windows.py", line 250, in start_async
    if plugin_class.needs_update_or_installation():
  File "C:\Users\shaad\AppData\Roaming\Sublime Text\Lib\python33\lsp_utils\_client_handler\abstract_plugin.py", line 101, in needs_update_or_installation
    server = cls.get_server()
  File "C:\Users\shaad\AppData\Roaming\Sublime Text\Lib\python33\lsp_utils\pip_client_handler.py", line 67, in get_server
    raise Exception('Python binary "{}" not found!'.format(python_binary))
Exception: Python binary "C:\Users\shaad\styxvenv312\bin\python" not found!

As you can see it does pick up on the binary_path setting, it just doesn't see it as a binary for some reason.

I first thought it was the same problem as #125 , but the error seems to be different.

@rchl
Copy link
Member

rchl commented Apr 9, 2024

Binaries on Windows have extensions and from the error it's clear that you haven't provided the extension. You need to make sure that the binary path that you've specified exists.

@Archer6621
Copy link
Author

Archer6621 commented Apr 16, 2024

Binaries on Windows have extensions and from the error it's clear that you haven't provided the extension. You need to make sure that the binary path that you've specified exists.

Thank you for the reply. Seems that making it point to a venv (which is extension-less by nature, also on Windows) is what caused the problem, when I set the path to an actual Python executable from an installation it started working :)

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

2 participants