Pipenv and PyLint

Viewed 1159

I have been using pipenv for my virtual environments and Pylint as the linter but every project seem to get and error when importing modules like Selenium or matplotlib.

I've never actually properly configured Pylint. Is there something I need to do in vscode to configure this correctly? Do I need to install Pylint in each individual project environment?

1 Answers

It is a good practice to use a virtual environment for every project of yours, and that each virtual environment has installed pylint if you want to use pylint as your linter.

In VS Code, you can enable the linter by choosing Python: Select Linter in the command palette, and this command adds "python.linting.<linter>Enabled": true to your settings, where <linter> is the name of the chosen linter.

Once you select the linter, in this case pylint, you will be prompted to install it if it is not installed in your virtual environment.

Based on what you are stating in your question, it is very likely that you are not selecting your interpreter properly, so you should check this link for further explanation about choosing an environment in VS Code.

enter image description here

Related