I want to use "Black code formatter" for one of my python projects. I've successfully installed it with "pip install black", which gave an output in the cmd which showed that all requirements were already satisfied (including "typed-ast>1.4.0").
However, when I try to run the "black --help" after installation, I get the error: "ImportError: cannot import the name '_ast3' from 'typed_ast". Does anyone know what might be the issue here?
Black can be installed by running pip install black . It requires Python 3.7+ to run. If you want to format Jupyter Notebooks, install with pip install 'black[jupyter]' .
Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from pycodestyle nagging about formatting. You will save time and mental energy for more important matters.
Try reinstalling and upgrading both typed-ast and black:
pip install --force-reinstall --upgrade typed-ast black
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With