sublack
sublack copied to clipboard
No such file or directory: 'black'
I've install black
within my conda
environment called py3
. My project is set to use this interpreter:
"settings":
{
"python_interpreter": "/home/gabriel/miniconda3/envs/py3/bin/python",
},
but when I try to apply black
I get the error:
Ok. I figured it out. Go to Preferences -> Package settings -> sublack -> Settings In the new sublack.sublime-settings file, paste the following: { "black_command": "C:/Users/analk/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0/LocalCache/local-packages/Python310/Scripts/black.exe", }
To find the particular path for, in your python interpretor,
import black print(black.path)
The output will be a folder's path. There will be a folder named 'Scripts' on the same level as 'site-packages' folder. The black.exe file will be inside the Scripts folder. You'll have to provide that path in the above "black_command" line.