sublimelsp / LSP-ruff

LSP helper for ruff - an extremely fast Python linter, written in Rust.
https://packagecontrol.io/packages/LSP-ruff
MIT License
26 stars 4 forks source link

Error installing the server: No module named venv #59

Closed yanecc closed 1 month ago

yanecc commented 1 month ago

os: Windows I am using python installed from Visual Studio and pixi, which is a conda package that doesn't contain venv.exe. I have installed ruff with scoop and set the command to the path of ruff.exe. But I still couldn't use the plugin, it tries to install ruff with venv.exe every time I open a python file and reports the error. I hope there is an option to disable the ruff installation.

MPSL`92VA7`B0)R8WGTFGP5

LDAP commented 1 month ago

This error is not specific to LSP-ruff but all LSP-* packages which use the PipClientHandler https://github.com/sublimelsp/lsp_utils/blob/main/st3/lsp_utils/pip_client_handler.py.

Why not install the venv package?

yanecc commented 1 month ago

This error is not specific to LSP-ruff but all LSP-* packages which use the PipClientHandler https://github.com/sublimelsp/lsp_utils/blob/main/st3/lsp_utils/pip_client_handler.py.

Why not install the venv package?

The python on my path is part of the IDE and I don't want too many python copies on my computer. Is there a way to avoid the usage?

LDAP commented 1 month ago

I'm afraid that is not possible https://github.com/sublimelsp/lsp_utils/blob/9de78d5bb86e394c5ace8aa3126f55b26dab820c/st3/lsp_utils/server_pip_resource.py#L100

You can install the venv package into the IDE Python installation

yanecc commented 1 month ago

All right.