I did pip install black for VS code editor. It is an alternative to prettier for python in vs code.
I received the following issues when I run black Untitled-1.py
.
Program 'black.exe' failed to run: Access is deniedAt line:1 char:1
+ black Untitled-1.py
+ ~~~~~~~~~~~~~~~~~~~.
At line:1 char:1
+ black Untitled-1.py
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
In the VS terminal.
I did not understand why access is deniedAt. I do not have any antiviruses running on my Windows 10.
I uninstalled python and ensure that it is uninstalled everywhere on my machine including the default version that comes with windows 10 now.
pip install black
{ "workbench.colorTheme": "Community Material Theme High Contrast", "editor.mouseWheelZoom": true, "workbench.iconTheme": "Monokai Pro Icons", "editor.defaultFormatter": "esbenp.prettier-vscode", "[solidity]": { "editor.defaultFormatter": "JuanBlanco.solidity", "editor.formatOnSave": true }, "editor.guides.bracketPairs": true, "[python]": { "editor.defaultFormatter": "ms-python.python", "editor.formatOnSave": true }, "editor.formatOnSave": true, "jupyter.askForKernelRestart": false, "python.defaultInterpreterPath": "C:\\Users\\Username\\AppData\\Local\\Programs\\Python\\Python310\\python.exe", "python.formatting.blackPath": "C:\\Users\\Username\\AppData\\Local\\Programs\\Python\\Python310\\Scripts\\black.exe", "python.formatting.provider": "black" }
This has solved my problem!