In VS Code, I have installed autopep8 and verified that the path is correct. I can use autopep8 in the terminal without any issues. However, when I search for the "python run" item in the Command Palette, I see all the other options from the extension except autopep8.
I have attempted to change the path of autopep8 to use the version installed in my machine's Python installation, but that didn't resolve the issue.
You can search Python.Formatting.Provider in settings and choose autopep8:
Or you can add the following codes to your settings.json:
"python.formatting.provider": "autopep8",
When you want to use format function, you can use shortcuts "Ctrl+Shift+P" and search "Format Document".
BTW, I suggest you add the following codes to your settings.json
as well:
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": true,