Issues in installing dbt on mac-tried by homebrew and PIP

Hi Team,
I’m seeking assistance regarding the current situation. As part of an upgrade initiative, I am in the process of transitioning from dbt core version 1.3.5 to 1.4.0. I am utilizing a MacBook Pro with an Apple M1 chip.
Approximately two months ago, I successfully installed dbt core after navigating through challenges, particularly with the Snowflake adapter(we require snowflake connectivity). The installation process involved referring to the documentation provided in the following link: Install with Homebrew | dbt Developer Hub. I did through homebrew.

Now, as we endeavour to upgrade the dbt version, we have attempted to follow a similar approach. The sequence of commands executed is as follows:

  1. Brew install dbt-snowflake@1.4.0

Getting this error-
Last 15 lines from /Users/ampl-neha/Library/Logs/Homebrew/dbt-snowflake@1.4.0/54.python3:

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /opt/homebrew/Cellar/dbt-snowflake@1.4.0/1.4.0/libexec/bin/python /opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py get_requires_for_build_wheel /private/tmp/tmpuhpuu683
cwd: /private/tmp/dbt-snowflakeA1.4.0–PyYAML-20240112-13286-an5nhs/PyYAML-6.0
Getting requirements to build wheel: finished with status ‘error’
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

[notice] A new release of pip is available: 22.3.1 → 23.3.2
[notice] To update, run: python -m pip install --upgrade pip

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
Issues · dbt-labs/homebrew-dbt · GitHub

However if I try to install snowflake@1.3.1 then it gets installed.

2- I have tried to install by pip too, getting this message for setting up path.

WARNING: The script protoc-gen-python_betterproto is installed in ‘/Users/ampl-neha/Library/Python/3.9/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script dbt is installed in ‘/Users/ampl-neha/Library/Python/3.9/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Babel-2.14.0 Jinja2-3.1.2 MarkupSafe-2.1.3 agate-1.7.0 asn1crypto-1.5.1 attrs-23.2.0 betterproto-1.2.5 certifi-2023.11.17 cffi-1.16.0 charset-normalizer-2.1.1 click-8.1.3 colorama-0.4.6 cryptography-38.0.4 dbt-core-1.4.9 dbt-extractor-0.4.1 dbt-snowflake-1.4.0 filelock-3.13.1 grpclib-0.4.7 h2-4.1.0 hologram-0.0.16 hpack-4.0.0 hyperframe-6.0.1 idna-3.6 importlib-metadata-7.0.1 isodate-0.6.1 jaraco.classes-3.3.0 jsonschema-4.20.0 jsonschema-specifications-2023.12.1 keyring-23.13.1 leather-0.3.4 logbook-1.5.3 mashumaro-3.3.1 minimal-snowplow-tracker-0.0.2 more-itertools-10.2.0 msgpack-1.0.7 multidict-6.0.4 networkx-2.8.8 oscrypto-1.3.0 packaging-23.2 parsedatetime-2.4 pathspec-0.10.3 pyOpenSSL-22.1.0 pycparser-2.21 pycryptodomex-3.20.0 pyjwt-2.8.0 python-dateutil-2.8.2 python-slugify-8.0.1 pytimeparse-1.1.8 pytz-2023.3.post1 pyyaml-6.0.1 referencing-0.32.1 requests-2.31.0 rpds-py-0.16.2 snowflake-connector-python-2.8.1 sqlparse-0.4.3 stringcase-1.2.0 text-unidecode-1.3 typing-extensions-4.9.0 urllib3-1.26.18 werkzeug-2.3.8 zipp-3.17.0
WARNING: You are using pip version 21.2.4; however, version 23.3.2 is available.
You should consider upgrading via the ‘/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install --upgrade pip’ command.
ampl-neha@Damanpreets-MacBook-Pro dcx-dbt % dbt --version
zsh: command not found: dbt
ampl-neha@Damanpreets-MacBook-Pro dcx-dbt % python3 --version
Python 3.9.6

3- Version of python installed on system-
ampl-neha@Damanpreets-MacBook-Pro dcx-dbt % python3 --version
Python 3.9.6

I upgraded my Python version yesterday and learned from an article that Python 12 is not compatible. Despite uninstalling Python 12 multiple times, I encountered a recurring issue where it gets installed again during attempts to install dbt.

Can anyone suggest-
Thanks,
Neha