2

How can I check if Pylint is successfully installed and configured in Visual Studio Code?

I have already set "Python: enable linting", but it seems to not be working. I ran code in the below problem field. Can someone explain what's going on in the below problem field?

Enter image description here

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
stephen xu
  • 21
  • 3

1 Answers1

2
  1. Check if Pylint is installed successfully:

    As a Python code analysis toolkit, Pylint is stored in the Python environment as a Pylint module, so we can use "pip show pylint" in the Visual Studio Code terminal to check its installation:

    Enter image description here

  2. The use of Pylint in Visual Studio Code:

    1. Install Pylint (pip install pylint).

    2. Select Pylint.

      Enter image description here

    3. Enable Pylint.

    4. Run (F1, Python: Run Linting)

      Enter image description here

Reference: Linting in Visual Studio Code.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Jill Cheng
  • 9,179
  • 1
  • 20
  • 25
  • `pip3 show pylint` on Ubuntu (tried on [Ubuntu MATE 20.04](https://en.wikipedia.org/wiki/Ubuntu_MATE#Releases) (Focal Fossa)) - "pip3", not "pip". `pip show pylint` results in *"Command 'pip' not found, but there are 18 similar ones."* (including in a Visual Studio Code environment). – Peter Mortensen Jan 12 '21 at 22:34