I've installed pylint
using pipx
so that it is available across all my virtual environments without having to add pylint
as a dev dependency for each project. I'm also using VS Code and have the following settings to enable pylint
and point towards the global pylint
that I've installed with pipx
in the .local/
directory.
{
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintPath": "~/.local/bin/pylint",
}
The issue I have is that pylint
import errors are displaying for packages I have installed within the virtual environment, and so I don't know how to link this global pylint
with the local virtual environment in my project so it can recognise the packages. In VS Code I have the Python interpreter within the virtual environment selected.
I'm guessing that I need to provide some setting to change the Python Path that pylint
uses to point to the currently active interpreter within VS Code. I'm just not sure whether that setting exists, nor of any workaround. Of course I could just install pylint
as a development dependency inside my project, but I'd rather just make use of the global pylint
if possible. Does anyone know of a solution?