Home > Software engineering >  Getting Pylint to work with VSCode-Server
Getting Pylint to work with VSCode-Server

Time:07-25

I'm running vscode-server to develop on a remote machine via ssh. This machine has no connection to the internet and runs Python 3.6.5.

I would like to use pylint in vscode for the linting. Problem is that I cannot install it the normal way, since I don't have an internet connection.

What I tried so far:

  • Use pip download pylint, tar the resulting folder, move it via scp and install it on the remote machine. This didn't work since my local mchine has a different python version from the remote (local: 3.10.x and remote: 3.6.5).
  • Use the Install on remote: ssh button in the vscode marketplace. This succeeds but when I write code, a message pops up that says: Linter pylint is not installed. When I click on install, it just tries to execute pip install pylint on the remote, which will obviously fail...

Any suggestions on how to proceed here?

CodePudding user response:

This didn't work since my local machine has a different python version from the remote (local: 3.10.x and remote: 3.6.5).

I don't know if it's ultimately going to work, but you can download the latest pylint compatible with python 3.6.5 explicitly, it's pylint 2.13.9 afaik so pip download "pylint==2.13.9".

CodePudding user response:

Problem is that I cannot install it the normal way, since I don't have an internet connection.

I think you can try to upload pylint locally to the server by using SFTP extension.

This extension can syncs your local directory with a remote server directory.

  • Related