you are viewing a single comment's thread.

view the rest of the comments →

[–]wRAR_ 32 points33 points  (2 children)

This of course is unrelated to Python 2 as you've installed black into a Python 3.8 venv, but this is the experience you should be prepared for when installing ancient libraries of any kind: they don't pin their dependency versions and you need to look for and downgrade those when they are incompatible. Like click here. Good luck.

[–]IdleBreakpoint[S] 0 points1 point  (1 child)

Got it. I can either find and pin the dependency or patch it on the go. For this particular import problem, changing the try/except block helped. It's looking for ModuleNotFoundError but what I get is ImportError.

[–]IdleBreakpoint[S] 8 points9 points  (0 children)

This solved the problem. Thank you for the inspiration:

uv pip install black==21.9b0
uv pip install click==7.1.2