question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linter pylint is not installed

See original GitHub issue

Environment data

VS Code version: 1.18.1 x64 Python Extension version: 0.8.0 Python Version: 3.6.3 OS and version: Win7 SP1 x64

Actual behavior

Launch VSCode Python project, Show “Linter pylint is not installed”, but I have already installed pylint. Press “Install pylint” button, show “Requirement already satisfied” Reinstall pylint can not fix this. (Uninstall and install again, still fail.)

Expected behavior

Detect pylint correct.

Steps to reproduce:

  • As was mentioned above

Logs

Output from Python output panel

Output from Console window (Help->Developer Tools menu)

E:\GitHub\script>C:\Python36\python.exe -m pip install pylint
Requirement already satisfied: pylint in c:\python36\lib\site-packages
Requirement already satisfied: colorama; sys_platform == "win32" in c:\python36\lib\site-packages (from pylint)
Requirement already satisfied: isort>=4.2.5 in c:\python36\lib\site-packages (from pylint)
Requirement already satisfied: six in c:\python36\lib\site-packages (from pylint)
Requirement already satisfied: mccabe in c:\python36\lib\site-packages (from pylint)
Requirement already satisfied: astroid>=1.5.1 in c:\python36\lib\site-packages (from pylint)
Requirement already satisfied: lazy-object-proxy in c:\python36\lib\site-packages (from astroid>=1.5.1->pylint)
Requirement already satisfied: wrapt in c:\python36\lib\site-packages (from astroid>=1.5.1->pylint)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

9reactions
9468305commented, Nov 28, 2017

Issue fixed. As above discussed, python output log end with No module named 'wrapt.wrappers'. Then I tried to reinstall wrapt and got a error:

D:\Users\chenqib>pip install wrapt
Collecting wrapt
  Using cached wrapt-1.10.11.tar.gz
Installing collected packages: wrapt
  Running setup.py install for wrapt ... error
Exception:
Traceback (most recent call last):
  File "c:\python36\lib\site-packages\pip\compat\__init__.py", line 73, in conso
le_to_str
    return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 2: invalid
continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python36\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\python36\lib\site-packages\pip\commands\install.py", line 342, in run

    prefix=options.prefix_path,
  File "c:\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\python36\lib\site-packages\pip\req\req_install.py", line 878, in inst
all
    spinner=spinner,
  File "c:\python36\lib\site-packages\pip\utils\__init__.py", line 676, in call_
subprocess
    line = console_to_str(proc.stdout.readline())
  File "c:\python36\lib\site-packages\pip\compat\__init__.py", line 75, in conso
le_to_str
    return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 2: invalid
continuation byte

This issue was discussed here https://github.com/GrahamDumpleton/wrapt/issues/112 . The failure is in pip/compat/init.py file:

if sys.version_info >= (3,):
    def console_to_str(s):
        try:
            return s.decode(sys.__stdout__.encoding)
        except UnicodeDecodeError:
               return s.decode('utf_8')

Since Windows console’s default encode format is GBK, sys.__stdout__ failed.

My solution is run pip install wrapt under Git Bash for Windows(MSYS, MinGW) console, which encode format is UTF-8 default.

chenqi@computer MINGW64 /
$ pip install --force-reinstall wrapt
Collecting wrapt
  Using cached wrapt-1.10.11.tar.gz
Installing collected packages: wrapt
  Running setup.py install for wrapt: started
    Running setup.py install for wrapt: finished with status 'done'
Successfully installed wrapt-1.10.11

Now everything is fine! Let’s check VSCode again.

##########Linting Output - pylint##########
************* Module geetest_offline_nm
35,4,warning,W0603:Using the global statement
114,4,warning,W0603:Using the global statement
-----------------------------------
Your code has been rated at 9.87/10

No config file found, using default configuration
0reactions
DonJayamannecommented, Nov 27, 2017

Looks like you have an issue with the installation of pylint (see the error message ModuleNotFoundError: No module named 'wrapt.wrappers').

Please try re-installing pylint and testing pylint from the command line. Closing as this is not an issue with the extension. Creating a separate issue that will ensure the right error message is displayed instead of ‘Linter pylint is not installed’

New issue to track incorrect error message https://github.com/Microsoft/vscode-python/issues/295

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message "Linter pylint is not installed" - Stack Overflow
Check the path Pylint has been installed to, by typing which pylint on your terminal. You will get something like: /usr/local/bin/pylint.
Read more >
Linter pylint is not installed - but it is · Issue #12507 - GitHub
I am new to python, and therefore these are the exact steps I took: Install python 3.8.3-amd64.exe from scratch, but to a directory...
Read more >
Linter pylint is not installed - Intellipaat Community
Steps to install pylint-. 1. Open a command prompt or terminal(For windows,navigate to install location). 2. Run: python-m pip install pylint.
Read more >
Linting Python in Visual Studio Code
The linter has not been installed in the current Python environment. Open a command prompt, navigate to the location where your selecter interpreter...
Read more >
Unable to Install Pylint - Python - Code with Mosh Forum
As I am never prompted to install pylint, I have no idea how to install it. It would be great if someone could...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found