Search code examples
pythonupgradeupdatespylintlinter

Upgrade Pylint Version 1.9.2 to latest Version


I'm using VS Code and it's Python Extension installed the linter Pylint 1.9.2 by default. However, It is highlighting some bugs/errors in my code which on execution worked correctly. A simple example:

class Point:

F0002:: generator raised StopIteration

While searching to resolve that issue, I found that it requires to upgrade/update the pylint to the latest version (Currently 2.2). I tired several commands on Git Bash terminal but no luck. The commands were

pip install pylint

Requirement already satisfied: pylint in c:\users\noor muhammad\appdata\roaming\python\python37\site-packages (1.9.2)

which pylint

which: no pylint in (/mingw64/bin:/usr/bin:/c/Users/Noor Muhammad/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cmd:/mingw64/bin:/usr/bin:/c/Program Files/Microsoft VS Code/bin:/c/WINDOWS/System32/OpenSSH:/c/Users/Noor Muhammad/AppData/Local/Programs/Python/Python37-32/Scripts:/c/Users/Noor Muhammad/AppData/Local/Programs/Python/Python37-32:/c/Users/Noor Muhammad/AppData/Local/Microsoft/WindowsApps:/c/Users/Noor Muhammad/AppData/Local/Programs/Python/Python37-32/Lib/site-packages/pip/main.py)

I tired pip documentation but I wasn't able to find how to update the linter to the latest version.

Edit: The pip list is as follows:

astroid 1.6.5 colorama 0.3.9 isort 4.3.4 lazy-object-proxy 1.3.1 mccabe 0.6.1 pip 18.0 pylint 1.9.2 setuptools 39.0.1 six 1.11.0 wrapt 1.10.11

A help would be really appreciated. Thanks


Solution

  • SOLVED:

    I went to the dictionary:

    c:\users******\appdata\roaming\python\python37

    and delete the site-package folder. then, the command:

    python -m pip install pylint
    

    took the rest.

    P.S: Mod, please mark the solution as solved