More than likely you installed autopep8 into a different interpreter/environment than you one have selected in VS Code. If you remove your formatter settings from your settings.json and then try formatting again, you will get prompted to choose and install a formatter (either autopep8, yapf, or black).

Answer from Brett Cannon on Stack Overflow
🌐
GitHub
github.com › microsoft › vscode-python › issues › 22412
python There is no formatter for 'python' files installed. · Issue #22412 · microsoft/vscode-python
November 2, 2023 - The latest vscode causes python's formatting buttons to disappear, even though I have all the relevant python plugins and autopep8 installed!
Author   ponponon
Discussions

"There is no formatter for 'python' files installed."
I have just installed the extension and reloaded my VSCode window. However, when attempted Cmd+P => Format document, I'm now faced with an error modal dialog: More on github.com
🌐 github.com
22
April 26, 2024
Format Document - Python - Code with Mosh Forum
In lesson 1-8 of the python course, I can not use “format document” in the command palette. I have installed many text formatters in VScode, like the suggested ones and XML tools, Json tools. Still, I face below error. Can anybody help, please? Error: There is no formatter for ‘plaintext’ files ... More on forum.codewithmosh.com
🌐 forum.codewithmosh.com
0
February 5, 2021
There is no formatter for 'python' files installed
There was an error while loading. Please reload this page · Have tried this VSCode settings config More on github.com
🌐 github.com
2
June 9, 2024
My formatter for Python in VS Code is not working.
I had the same issue and fixed it by installing black-formatter and making sure following in the settings.json: "[python]": { "editor.defaultFormatter": "ms-python.black-formatter" }, More on reddit.com
🌐 r/AskProgramming
6
4
December 6, 2023
🌐
Reddit
reddit.com › r/askprogramming › my formatter for python in vs code is not working.
r/AskProgramming on Reddit: My formatter for Python in VS Code is not working.
December 6, 2023 -

I have been using VS Code for as long as I can remember, but for a few days now, when I try to format any of my Python files, it shows the error:

There is no formatter for 'python' files installed. Install Formatter...

I have the Prettier extension installed, which I use to format other files too. The default formatter for Python is set to prettier. It works for all other files, like JS, Java, C++, etc. The error only arises for Python files.

Please tell me what I can do to make it work again. Thank You.

🌐
Visual Studio Code
code.visualstudio.com › docs › python › formatting
Formatting Python in VS Code
November 3, 2021 - In order to set a formatter extension as an import sorter, you can set your preference under "editor.codeActionsOnSave" in your User settings.json file or your Workspace settings.json file, under a [python] scope. You can open these settings.json files using the Preferences: Open User Settings (JSON) and Preferences: Open Workspace Settings (JSON) commands respectively.
🌐
GitHub
github.com › astral-sh › ruff-vscode › issues › 460
"There is no formatter for 'python' files installed." · Issue #460 · astral-sh/ruff-vscode
April 26, 2024 - I have just installed the extension and reloaded my VSCode window. However, when attempted Cmd+P => Format document, I'm now faced with an error modal dialog:
Author   samuela
🌐
Code with Mosh
forum.codewithmosh.com › python
Format Document - Python - Code with Mosh Forum
February 5, 2021 - In lesson 1-8 of the python course, I can not use “format document” in the command palette. I have installed many text formatters in VScode, like the suggested ones and XML tools, Json tools. Still, I face below error. Can anybody help, please? Error: There is no formatter for ‘plaintext’ files ...
Find elsewhere
🌐
GitHub
github.com › kbrose › vsc-python-indent › issues › 121
There is no formatter for 'python' files installed · Issue #121 · kbrose/vsc-python-indent
June 9, 2024 - Have tried this VSCode settings config "[python]": { "editor.defaultFormatter": "KevinRose.vsc-python-indent", "diffEditor.ignoreTrimWhitespace": false, &quo...
Author   eodeluga
🌐
YouTube
youtube.com › shorts › disb-i19pcM
VSCode how to format code. There is no formatter for python files installed - YouTube
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
Published   August 29, 2024
🌐
Medium
medium.com › @craakash › effortless-python-perfection-mastering-code-formatting-with-vs-code-extensions-e7035d58c4a3
Effortless Python Perfection: Mastering Code Formatting with VS Code Extensions | by Aakash Chavan Ravindranath, Ph.D | Medium
April 11, 2024 - Step 2: Installing the Python Extension for VS Code · Before formatting Python code, you need to install the Python extension for VS Code. This extension provides enhanced support for Python, including features such as IntelliSense, linting, ...
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Formatter extension for Visual Studio Code using autopep8
Visual Studio Code>Programming Languages>autopep8New to Visual Studio Code? Get it now.
🌐
Readthedocs
py-vscode.readthedocs.io › en › latest › files › linting.html
Linting & Formatting 🎀 — How to Python in VS Code 🦄 documentation
You have to install flake8 and black in your environment via pip install flake8 and pip install black respectively. If you want to set them up globally and don’t want to worry about formatting ever again, you have set up their global paths. To do so: ... Now go to the settings and search ...
🌐
Medium
danlabrador.medium.com › how-to-set-up-python-auto-formatter-on-save-in-vs-code-52a8ef84e2e4
How to set up Python auto-formatter on save in VS Code | Medium
March 28, 2025 - ... First, you need to install the following VS Code extensions. As of time writing, both of them are still in preview but they already work reliably. Black Formatter provides formatting support to your Python file.
🌐
Orchestra
getorchestra.io › guides › how-to-install-black-formatter-on-vs-code
How to Install Black Formatter on VS Code | Orchestra
February 10, 2026 - With Black installed and the Python extension added to VS Code, you can now configure VS Code to use Black for formatting your Python code. ... Press Ctrl + , (Windows/Linux) or Cmd + , (macOS) to open the settings. In the search bar, type "format on save" and check the option "Editor: Format On Save." This ensures your code is automatically formatted every time you save a file.
🌐
Agiliq
books.agiliq.com › projects › essential-python-tools › en › latest › linters.html
Linters and formatters — Essential Python Tools 3.7 documentation
black is a python code auto-formatter. Black reformats entire files in place and also formats the strings to have double-qoutes. Black is not configurable(except for line-length). To install it: pip install black.
🌐
YouTube
youtube.com › federico tartarini
How to Set-Up Black to Automatically Reformat Your Code in Visual Studio Code - YouTube
In this video, I will guide you through the process of installing and setting up Black to automatically reformat your Python code inside Visual Studio Code. ...
Published   October 27, 2022
Views   16K
🌐
DataCamp
datacamp.com › tutorial › setting-up-vscode-python
Setting Up VSCode For Python: A Complete Guide | DataCamp
December 3, 2024 - For formatting the Python file on save, we have to search for format on save in the Settings and enable the Editor: Format on Save option. Use this table as a reference to know which tools to install for your use case.
🌐
Databricks
docs.databricks.com › notebooks › develop code in notebooks
Develop code in Databricks notebooks | Databricks on AWS
January 8, 2026 - On Databricks Runtime 10.4 LTS and below, you must install black==22.3.0 and tokenize-rt==4.2.1 from PyPI on your notebook or cluster to use the Python formatter. You can run the following command in your notebook: ... For more details about installing libraries, see Python environment management. For files and notebooks in Databricks Git folders, you can configure the Python formatter based on the pyproject.toml file.
🌐
Lsst
developer.lsst.io › python › formatting.html
Formatting Python Code Automatically — LSST DM Developer Guide main documentation
Once installed it is possible to configure editors to automatically apply these tools on save but care must be taken that this ability is not enabled globally. When a repository is migrated to black and isort a GitHub Action should be installed. A suitable Action py-formatting.yaml is included in the LSST action templates repository. It may need to be adjusted if there is no bin.src directory.