I have a similar issue, i have tried on a new project:
mkdir test_django
cd test_django
python3 -m venv .venv
source .venv/bin/activate
pip3 install Django
pip install --upgrade pip
django-admin startproject testdjango .
and this is the stack trace with the same error:
Traceback (most recent call last):
File "/Users/lucianboboc/.pyenv/versions/3.11.3/bin/django-admin", line 8, in <module>
sys.exit(execute_from_command_line())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lucianboboc/.pyenv/versions/3.11.3/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/Users/lucianboboc/.pyenv/versions/3.11.3/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/lucianboboc/.pyenv/versions/3.11.3/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/lucianboboc/.pyenv/versions/3.11.3/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lucianboboc/.pyenv/versions/3.11.3/lib/python3.11/site-packages/django/core/management/commands/startproject.py", line 21, in handle
super().handle("project", project_name, target, **options)
File "/Users/lucianboboc/.pyenv/versions/3.11.3/lib/python3.11/site-packages/django/core/management/templates.py", line 232, in handle
run_formatters([top_dir], **formatter_paths)
File "/Users/lucianboboc/.pyenv/versions/3.11.3/lib/python3.11/site-packages/django/core/management/utils.py", line 172, in run_formatters
subprocess.run(
File "/Users/lucianboboc/.pyenv/versions/3.11.3/lib/python3.11/subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lucianboboc/.pyenv/versions/3.11.3/lib/python3.11/subprocess.py", line 1024, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/lucianboboc/.pyenv/versions/3.11.3/lib/python3.11/subprocess.py", line 1917, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/black'