0

I am trying to turn on Pylint.

I type in 'Ctrl + Shift + P', and I click Python: Select Linter, and then I try to click 'bandit'.

When I do this, the pop up window in the bottom right corner says 'Linter bandit is not installed'.

When I click install, I get:

Collecting bandit
  Using cached https://files.pythonhosted.org/packages/5a/50/ff2f2c8f1f0ca1569f678eeb608c0f973b835985410985594fbee96be820/bandit-1.6.2-py2.py3-none-any.whl
Exception:
Traceback (most recent call last):
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2795, in _dep_map
    return self.__dep_map
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2652, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\basecommand.py", line 211, in main
    status = self.run(options, args)
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\commands\install.py", line 294, in run
    requirement_set.prepare_files(finder)
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py", line 334, in prepare_files
    functools.partial(self._prepare_file, finder))
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py", line 321, in _walk_req_to_install
    more_reqs = handler(req_to_install)
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\req\req_set.py", line 561, in _prepare_file
    set(req_to_install.extras) - set(dist.extras)
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2774, in extras
    return [dep for dep in self._dep_map if dep]
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2797, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2830, in _compute_dependencies
    common = frozenset(reqs_for_extra(None))
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2827, in reqs_for_extra
    if req.marker_fn(override={'extra':extra}):
  File "C:\Users\Scott\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pip\_vendor\_markerlib\markers.py", line 113, in marker_fn
    return eval(compiled_marker, environment)
  File "<environment marker>", line 1, in <module>
NameError: name 'platform_system' is not defined
You are using pip version 7.1.2, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

I have already upgraded my pip version to the most recent. Basic Googling tells me that this is using a virtual environment, and the venv is using an earlier version of pip, but I have no idea how to fix this.

Please help.

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
  • Are you running this in some IDE? What GUI are you interacting with? – MisterMiyagi Jan 19 '20 at 08:16
  • This is in vscode. I found that eventually when I tried to install it, a prompt came up asking if I wanted to use conda or pip to install it, and I clicked pip. I don't know why the prompt didn't come up earlier. – Scott Crawshaw Jan 20 '20 at 09:07

0 Answers0