New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to run pylint as `python[3] -m pylint` not `pylint`? #1767

foreverbell opened this Issue May 9, 2016 · 2 comments


None yet
2 participants
Copy link

foreverbell commented May 9, 2016

Sorry, here I am just asking a question.

I have both tried

let g:syntastic_python_pylint_exec = 'python -m pylint`


let g:syntastic_python_pylint_exec = 'python'
let g:syntastic_python_pylint_args = '-m pylint'

But neither of them works. The first one seems that syntastic doesn't find pylint executable so ignoring pylint checker, the second one keeps telling me that syntastic: error: checker python/pylint: can't parse version string (abnormal termination?), so what is the intended way?

syntastic is upgraded to the newest version, commit d69c878499ab4a07562706e6ba84bcd24660c969.


This comment has been minimized.

Copy link

lcd047 commented May 9, 2016

Use *_exe instead of *_exec (yeah, stupid choice of names; too late to change them now). The *_exec thing is supposed to point to an executable, and is used to check that the binary is installed. It's also used to run version checks. On the other hand, *_exe is what is expanded on the command line. When left unset, *_exe is initialised to the value of *_exec. So this should work:

let g:syntastic_python_pylint_exe = 'python -m pylint'

However, if you plan to use this to switch between Python 2 and Python 3 you'll find it fragile, since the version checks will still be for the Python 2 pylint, while you'd run Python 3 pylint for checks (the version checks are used to decide error format). A much better solution would be to use pyenv or viurtualenv to set an environment for the current project, install pylint there, and run Vim from the environment. Then you wouldn't need to tell syntastic which module to load, and this would work for all Python checkers. I really should add this to the FAQ.

@lcd047 lcd047 closed this May 9, 2016


This comment has been minimized.

Copy link

foreverbell commented May 9, 2016

Thank you, I got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment