If you are using pre-commit, you do not need to follow these steps. pre-commit installs Pylint for you. We highly recommend using pre-commit. For more information, check out this page: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code

Installing Pylint is quite easy. Simply run the install command and it will install Pylint and all of the necessary dependencies.

Install Pylint on MacOS

Open a terminal program, and verify you have the necessary tools installed:

  • Type python --version. If it returns Python 3.x.x, type pip --version to verify you have pip installed.
  • If --version returns Python 2.x.x, type python3 --version to verify you have Python 3 installed. Then, type pip3 --version to verify you have it installed.

To install Pylint, run the following command:

  • pip3 install pylint
  • If python --version returned 3.x.x, run: pip install pylint

Install Pylint on Windows

Open the Command Prompt application. (You can search for "command" to find it.) Consider pinning it to the task bar as you'll be using it often!

Open Command Prompt, and verify you have the necessary tools installed:

  • Type python --version to verify you have 3.x.x installed. Then type pip --version to verify you have pip installed.
If you find you do not have Python installed, you can find various versions on the official Python.Org website at https://www.python.org/downloads/windows/

To install Pylint, run the following command:

  • pip install pylint

Now that you have Pylint installed, you'll want to know how to configure what it checks for. If this is the first time you've installed Pylint, you can skip the next section on this page.

Upgrading Pylint

If you've had Pylint installed for a while, you may want to consider upgrading it. First, to check the version of Pylint you're running, run the following command:

  • pylint --version

To upgrade to the absolute latest version, run the following command:

  • pip install pylint --upgrade

If you want to install a specific version, run the following command with the version you wish to install. For example, to install version 2.7.1, run the following:

  • pip install --force-reinstall pylint==2.7.1

That's all there is to upgrading Pylint. Now, it's time to learn about configuration.

This guide was first published on Aug 23, 2019. It was last updated on Mar 28, 2024.

This page (Install Pylint) was last updated on Mar 08, 2024.

Text editor powered by tinymce.