[VS Code] Python language Server no longer starts

Suddenly VS Code extension, Python Language Server download stopped halfway. I can't proceed with the following display under the taskbar.

Downloading Microsoft Python Language Server... 31634 of 32423 KB(98%)

In the Python Language Server tab of the [Output] panel,

Downloading https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-linux-x64.0.5.31.nupkg...

Is displayed, and the situation does not proceed any further.

I couldn't read the details from the log file, so I tried rebooting and installing another version of the Python extension, but it didn't work.

I manually unzipped the source so that it can be started, so I will show you the procedure. It wouldn't be possible without languageServer.

environment

You are remotely connected to CentOS 7 from VScode on Windows 10. PythonLanguageServer did not start on CentOS. The environment is as of March 23, 2020, so be careful when using it as a reference.

Remove languageServer

The body of the Python extension is in ~ / .vscode-server / extensions / ms-python.python-YYYY.m.XXXXX. The languageServer.0.XX.X in this is the languageServer itself.

Since the languageServer is placed manually, delete the languageServer. Create a directory for placement. It seems that the name should start with languageServer (unconfirmed).

$ rm -rf languageServer.0.XX.X/
$ mkdir languageServer/

language Server DL

DL languageServer from the URL displayed on the panel. Rename .nupkg to .zip.

~$ wget https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-linux-x64.0.5.31.nupkg
~$ mv Python-Language-Server-linux-x64.0.5.31.nupkg Python-Language-Server-linux-x64.0.5.31.zip

Deployment, placement

unzip.

~$ unzip Python-Language-Server-linux-x64.0.5.31.zip -d ~/.vscode-server/extensions/ms-python.python-2020.3.69010/languageServer/

I was able to deploy it with this, but if I start it as it is, an error will occur due to permissions. Grant execute permission to the executable file languageServer / Microsoft.Python.LanguageServer.

~$ sudo chmod 775 ~/.vscode-server/extensions/ms-python.python-2020.3.69010/languageServer/Microsoft.Python.LanguageServer

Start-up

I feel like I can start it at this point, but when I start it

[Error - 16:29:06] Starting client failed
Launching server using command dotnet failed.

Is displayed. You can install dotnet, but I'm not sure that you will need dotnet if you deploy it yourself. .. ..

.NET installation

Dependent libraries

$ yum install -y libunwind libicu

Add repository

$ rpm --import https://packages.microsoft.com/keys/microsoft.asc
$ vi /etc/yum.repos.d/dotnetdev.repo
[packages-microsoft-com-prod]
name=packages-microsoft-com-prod
baseurl=https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc

Installation

$ yum list | grep dotnet
$ yum -y install dotnet-sdk-3.1.200

Verification

$ dotnet --version
3.1.200

Successful startup

In my environment, this started languageServer. To be honest, I don't know if it makes sense, but I will add the following to settings.json.

{
    "python.downloadLanguageServer": false,
    "python.jediEnabled": false,
}

reference

Can the language server be installed manually_ · Issue #1698 · microsoft_python-language-server Downloading Python-Language-Server too slowly in China_ · Issue #1916 · microsoft_python-language-server

Recommended Posts

[VS Code] Python language Server no longer starts
eclipse no longer starts.
Python with VS Code (Windows 10)
Debug Python with VS Code
If you want Python completion in VS Code, Microsoft Python Language Server is the best story
That Python code has no classes ...
[VS Code] ~ Tips when using python ~
Install python with mac vs code
VS Code + Azure Functions + Python environment construction procedure
Python (Windows 10) Virtual Environment / Package with VS Code
Debug with VS Code using boost python numpy
Use Python in Anaconda environment with VS Code
Make your Python environment "easy" with VS Code
Build a python execution environment with VS Code
VS Code settings
python character code
python starts with ()
[Python] Algorithm-aware code
[Python] Lint pylint is not installed is displayed [VS Code]
[Python] I immediately tried using Pylance's VS Code extension.
Try touching the micro: bit with VS Code + Python
Allow real-time code checking in Python development with VS Code
VS Code settings for developing in Python with completion
How to make a Python package using VS Code
I tried input interpolation on UE4 Python VS Code
Expose settings.json for efficient Python coding in VS Code
[No venv required] The strongest Python development environment created with Remote Containers [VS Code / Docker]