Skip to content

PyLint not working with global interpreter #1307

Closed
@qubitron

Description

@qubitron

Environment data

  • VS Code version: 1.21.1
  • Extension version (available under the Extensions sidebar): 2018.3.1
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: pylint

Actual behavior

I have pylint installed in the global interpreter, on saving file I get no linting, no banner to install pylint.

Expected behavior

Linting works on save

Steps to reproduce:

  1. Install pylint in a global interpreter
  2. Use global interpreter
  3. write bad python code and hit save (e.g. "fjdsklj")

Using pylint version 1.8.4

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

##########Linting Output - pylint##########
Traceback (most recent call last):
  File "C:\dev\Python3.6\lib\runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\dev\Python3.6\lib\runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "C:\dev\Python3.6\lib\runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "C:\Users\dantaylo\AppData\Roaming\Python\Python36\site-packages\pylint\__init__.py", line 11, in <module>
    from .__pkginfo__ import version as __version__
  File "C:\Users\dantaylo\AppData\Roaming\Python\Python36\site-packages\pylint\__pkginfo__.py", line 25, in <module>
    from pkg_resources import parse_version
ModuleNotFoundError: No module named 'pkg_resources'

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

No output in the console

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions