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).
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).
I had the same problem, but I was using Prettier. Thus it doesn't support python properly or vscode doesn't recognize it as python formatter.
I installed autopep8 for python in extentions bar. Then I configured the settings.json for user and workspace settings.json:
user settings:
"[python]": {
"editor.formatOnType": true,
"editor.defaultFormatter": "ms-python.autopep8"
},
workspace-settings:
"folders": [
{
"path": "."
}
],
"settings": {
"git.ignoreLimitWarning": true,
"python.defaultInterpreterPath": "path_to_your_project",
"[python]": {
"editor.defaultFormatter": "ms-python.autopep8"
}
},
And it worked!
"There is no formatter for 'python' files installed."
Format Document - Python - Code with Mosh Forum
There is no formatter for 'python' files installed
My formatter for Python in VS Code is not working.
Videos
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.