Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linter pylint is not installed vscode

I know there are multiple version of this question on SO, I've tried the solutions posted on those threads and they don't seem to help :(

I have VS Code installed in an Ubuntu VM. I can't seem to get the python linter to work. i.e. I get a message saying

Linter pylint is not installed 

I am pretty sure pylint is installed on the VM because when I run which pylint I have a valied output.

Here are the outputs for which python and which pylint respectively

/usr/bin/python
/home/rakshak/.local/bin/pylint

And I have the following in my User settings and workspace settings in VS Code

// Place your settings in this file to overwrite the default settings
{
       "python.linting.pylintEnabled": true,
       "python.linting.pylintPath": "/home/rakshak/.local/bin/pylint",
       "python.pythonPath": "/usr/bin/python"
}
like image 311
DrkStr Avatar asked Sep 24 '18 03:09

DrkStr


People also ask

How do you install linter Pylint?

In that case, either run VS Code elevated, or manually run the Python package manager to install the linter at an elevated command prompt for the same environment: for example sudo pip3 install pylint (macOS/Linux) or pip install pylint (Windows, at an elevated prompt).


1 Answers

So, turns out this was just a permissions issue!

When I got the pylint not installed message, I was presented with a button to "Install pylint" this runs

sudo pip install pylint

This changed the owner of my .local/lib/ to root and made it inaccessible to vscode.

Output of ls -ld ~/.local/lib/ was

drwx------ 3 root root 4096 Sep 24 10:49 /home/userName/.local/lib/

Runing chown with my group and user fixed this issue.

sudo chown -R group:user ~/.local

now the output of ls -ld ~/.local/lib/ reads

drwx------ 3 userGroup userName 4096 Sep 24 10:49 /home/rakshak/.local/lib/

like image 68
DrkStr Avatar answered Sep 20 '22 19:09

DrkStr