2

I want to install pylsp on my neovim with mason, but when I try to do it I get this error message:

Installation failed for Package(name=python-lsp-server) error="Failed to create python3 virtual environment."

I made sure that the python virtual environment packages are installed and tried to create a virtual environment myself, so I don't know why mason can't do it.

I'm using:
ubuntu 20.4
nvim V0.9.0
mason V1.0.1
python 3.8

So, doe's anyone have an idea on how to approach this error?

1 Answers1

5

I had the same issue. It looks like mason need to create a virtualenv to install pylsp (I had the same problem with black). See this https://neovim.discourse.group/t/ubable-to-install-pylsp/3921 for reference. Running:

sudo apt-get install python3-venv

did the job for me (ubuntu 22.04)