Anaconda python 3.9.11 + (at least) black broken

Steps to reproduce:
miniconda, Windows 10 x64

conda create -n tmp python=3.9.11 black
conda activate tmp
black .

will result in an error

\lib\site-packages\typed_ast\ast3.py", line 40, in
from typed_ast import _ast3
ImportError: DLL load failed while importing _ast3

Rolling back to python 3.9.7 clears the issue - everything works as expected.

1 Like

Python build 3.9.11-h6244533_2 fixed it. Thanks!

2 Likes

same error as in the first message applies to python 3.10.4 (from main channel) as well as 3.10.5 from conda-forge.
black does not run because of the ast error

Steps to reproduce:
miniconda, Windows 10 x64

conda create -n tmp python=3.10.4 black
conda activate tmp
black .

will result in an error

\lib\site-packages\typed_ast\ast3.py", line 40, in
from typed_ast import _ast3
ImportError: DLL load failed while importing _ast3

Rolling back to python 3.9 clears the issue - everything works as expected.
Rolling back to python 3.10.3 does not clear the issue.

2 Likes
conda create -n tmp python=3.10.4 black typed-ast>=1.5

will fix the issue
to me this sounds like conda should update the typed-ast version in its main channel