how to enable linter pylint enable in vs code when Python: Select linter>>pylint

4.8k Views Asked by At

I am not able to enable pylint in VS code from python:select linter the dialogue box to enable linter doesn't appear what to do? can someone help me ?

2

There are 2 best solutions below

3
On

Press Ctrl+,

It will open up vscode settings, there you can search for "Pylint enabled" and tick the checkbox to enable it.

Pylint enabled checkbox

Note: if pylint is not installed, it will ask if it can install it. Allow that.

0
On

For using Python's code analysis tool "Pylint" in VS Code, please refer to the following:

1.Please install "pylint" in the python environment currently used by VS Code.(pip install pylint)

(Please note that the python used in the VS Code terminal is the same as the one displayed in the lower left corner of VS Code. check python: "python --version" )

2.Then use the following settings in "settings.json":

"python.linting.enabled": true,
"python.linting.pylintEnabled": true, 

enter image description here

Reference: Linting Python in Visual Studio Code.