The repo uses python3.8 in it’s venv and I have aliased python and python3 to python3.8 in the repo. But for some reason, am getting the following error.
autoflake................................................................Failed
- hook id: autoflake
- exit code: 1
Traceback (most recent call last):
File "/Users/user/.cache/pre-commit/rlztp1/py_env-python3/bin/autoflake", line 5, in <module>
from autoflake import main
File "/Users/user/.cache/pre-commit/rlztp1/py_env-python3/lib/python3.12/site-packages/autoflake.py", line 32, in <module>
import distutils.sysconfig
ModuleNotFoundError: No module named 'distutils'
It seems for some reason, autoflake is trying to use the global 3.12 installation of python instead of 3.8.
Tried manually installing setuptools using brew, and it’s already installed
New contributor
Bhanuteja Muthineni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.