joslarson / black-vscode

Deprecated: VS Code extension to format Python code using Black
https://marketplace.visualstudio.com/items?itemName=joslarson.black-vscode
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

Can't find black when installed into venv #1

Closed pzelnip closed 6 years ago

pzelnip commented 6 years ago

I installed Black into a virtual environment, and every time I try to format I get:

Command "black" not found in PATH.  Try `pip install black`

If I install systemwide the error goes away. Would be nice to not have to install system-wide, much like I don't with tools like autopep8 or pylint.

joslarson commented 6 years ago

@pzelnip I'm assuming you want it to respect the Python environment set by the Python extension, is that right? I agree that's something that should be added. But as a work around, what I'm doing currently is launching vscode as a subprocess of a shell with my virtual environment activated.

pzelnip commented 6 years ago

Correct, I'd expect the python.pythonPath setting to be used.

joslarson commented 6 years ago

@pzelnip just published a fix for this. Thanks for the heads up :)