Pylint requires the latest astroid package. It should be compatible with any Python version >= 2.7.
The source tarball is available at http://download.logilab.org/pub/pylint.
You may apt-get a well-tested Debian or Ubuntu package by adding one of these lines:
deb http://download.logilab.org/production unstable/
deb http://download.logilab.org/production sid/
deb http://download.logilab.org/production squeeze/
deb http://download.logilab.org/production lenny/
to your /etc/apt/sources.list file. Pylint is also available in the standard Debian distribution (but add our public debian repository anyway if you want to get the latest releases and upgrades earlier)
Pylint is also available in Gentoo, Fedora 4, Ubuntu, FreeBSD, Darwin (and maybe others, if you know about more OSes, please drop us a note!).
Pylint should be easily installable using setuptools and the Python Package Index. Try easy_install or pip, depending on your preference.
From the source distribution, extract the tarball, go to the extracted directory and simply run
python setup.py install
You’ll have to install dependencies in a similar way.
Windows users may get valuable information about Pylint installation on this page.
On Windows, once you have installed Pylint, the command line usage is
pylint.bat [options] module_or_package
But this will only work if pylint.bat is either in the current directory, or on your system path. (setup.py will install python.bat to the Scripts subdirectory of your Python installation – e.g. C:Python24Scripts.) You can do any of the following to solve this:
To effect (2), simply append the appropriate directory name to the PATH= statement in autoexec.bat. Be sure to use the Windows directory separator of ‘;’ between entries. Then, once you have rebooted (this is necessary so that the new path statement will take effect when autoexec.bat is run), you will be able to invoke Pylint with pylint.bat on the command line.
(3) is the best solution. Once done, you can call Pylint at the command line without the .bat, just as do non-Windows users by typing:
pylint [options] module_or_package
To effect option (3), simply create a plain text file pylint.bat with the single line:
C:\PythonDirectory\Scripts\pylint.bat
(where PythonDirectory is replaced by the actual Python installation directory on your system – e.g. C:Python24Scriptspylint.bat).