0

Running pre-commit gives the error AssertionError: black requires Python 3.6+. But Python 3.8 is installed. The version of pre-commit is 1.15.2.

anthony sottile
  • 61,815
  • 15
  • 148
  • 207
Raphael
  • 1,518
  • 2
  • 14
  • 27

1 Answers1

1

Another installation of pre-commit (from Snap) was shadowing the correct one. Solved with these steps:

  1. Remove the pre-commit installed with Snap: snap remove pre-commit.
  2. Install it with Pip: python -m pip install pre-commit.
Raphael
  • 1,518
  • 2
  • 14
  • 27