# python: Properly check for Pyright language server in local environment \(\#24873\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f2b7d8a9c9d67eefdfc0e0fcea798fe5b318f1b4)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f2b7d8a9c9d67eefdfc0e0fcea798fe5b318f1b4

Requested commit: f2b7d8a9c9d67eefdfc0e0fcea798fe5b318f1b4

Commit: f2b7d8a9c9d67eefdfc0e0fcea798fe5b318f1b4

Tree: 6bb6d63d0cb587014465374fc949918409f4c3aa

Author: Finn Evers

Committer: GitHub

## Message

```
python: Properly check for Pyright language server in local environment (#24873)

Closes #24565 

As pointed out in
https://github.com/zed-industries/zed/issues/24565#issuecomment-2657822723
, the name for the Pyright language server is `pyright-langserver`, not
`pyright`. The latter is a CLI-tool as described in
https://microsoft.github.io/pyright/#/command-line which only provides
static type checking. It has neither LSP-capabilities nor a `--stdio`
argument. Thus, the error as shown in the linked issue appears.

I disagree with the fix as described in
https://github.com/zed-industries/zed/issues/24565#issuecomment-2657904208
, as it could only cause this error to reappear in rare scenarios where
Pyright, but not the Pyright language server is installed in a user's
environment. Just checking for `pyright-langserver` to be present in the
environment seems more straightforward here.

Release Notes:

- Python: Fixed Pyright failing to start when installed locally

Co-authored-by: Beniamin Zagan <47153906+beniaminzagan@users.noreply.github.com>
```

## Parents

- [1d513dd32ba778bfc6181ca73419e4c1a52f9c99](https://git.cafe/gitcafe/zed/commit/1d513dd32ba778bfc6181ca73419e4c1a52f9c99?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f2b7d8a9c9d67eefdfc0e0fcea798fe5b318f1b4?format=markdown)
