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.

Black and flake8 installation not found

See original GitHub issue

We have written the needed data into your clipboard because it was too large Issue Type: Bug

Behaviour

Expected vs. Actual

Black and flake8 packages should be found and enabled in my project. This worked in the previous version of the Python extension. Once I upgraded the Python extension, black and flake 8 stopped working and the vs code keeps prompting me that they are not installed. Even if I installl them again by clicking Yes on the prompt window (the installation is skipped as they are already there), the same prompt appears again.

Steps to reproduce:

  1. Create a dummy python project.
  2. Install and configure black and flake8.
  3. VS Code will still prompt that they are not installed.

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.12
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Default
User Settings


defaultLS: {"defaultLSType":"Pylance"}

downloadLanguageServer: true

envFile: "<placeholder>"

venvPath: "<placeholder>"

venvFolders: "<placeholder>"

condaPath: "<placeholder>"

pipenvPath: "<placeholder>"

poetryPath: "<placeholder>"

languageServer: "Pylance"

linting
• enabled: true
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: true
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: false
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: false
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: false
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: false
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: false
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: false
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"

sortImports
• args: "<placeholder>"
• path: "<placeholder>"

formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "black"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"

testing
• cwd: "<placeholder>"
• debugPort: 3000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: undefined
• nosetestPath: "<placeholder>"
• promptToConfigure: true
• pytestArgs: "<placeholder>"
• pytestEnabled: true
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true

terminal
• activateEnvironment: true
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"

experiments
• enabled: true
• optInto: []
• optOutFrom: []

tensorBoard
• logDirectory: "<placeholder>"

Extension version: 2022.4.0 VS Code version: Code 1.66.0 (e18005f0f1b33c29e81d732535d8c0e47cafb0b5, 2022-03-30T05:50:14.623Z) OS version: Windows_NT x64 10.0.19043 Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 7 1700 Eight-Core Processor (16 x 3818)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.95GB (15.24GB free)
Process Argv . --crash-reporter-id 0ccd9b63-5884-429b-99fb-2b89d3a15d21
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vsclayoutctrc:30451274
dsvsc009:30452663
pythonvsnew555:30457759
vscscmwlcmt:30438805
vscgsvidc:30447482
pynewfile477:30463512

to send. Please paste.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

1reaction
hojo0590commented, Apr 7, 2022

Could you please try installing https://github.com/microsoft/vscode-python/suites/5947251954/artifacts/203903588 and see if it helps? You can use Extension: Install from VSIX command to install it.

black is working again - no more popups to install flake8 and mypy on my side

0reactions
karrtikrcommented, Apr 6, 2022

Could you please try installing https://github.com/microsoft/vscode-python/suites/5947251954/artifacts/203903588 and see if it helps? You can use Extension: Install from VSIX command to install it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

zsh: command not found: flake8 but flake8 is installed
The flake8 script isn't in your path. First figure out where it's installed: pip show -f flake8. You should see the install location, ......
Read more >
flake8-black
You can install flake8-black using pip, which should install flake8 and black as well if not already present: $ pip install flake8-black.
Read more >
flake8: command not found after installing it with pip on ...
You can find out what your path is by running echo $PATH . The message indicates where it installed flake8, and that the...
Read more >
Flake8: Your Tool For Style Guide Enforcement — flake8 6.0.0 ...
Installation ¶. To install Flake8, open an interactive shell and run: python<version> -m pip install flake8. If you want Flake8 to be installed...
Read more >
SublimeLinter-addon-black-for-flake - Packages
You need to install SublimeLinter-flake8!. Highly recommended is to install sublack as well. The plugin will configure the flake8 plugin and mute all...
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