'Trying to run Python 3.10 from Terminal after Homebrew install

I used the Homebrew command brew install [email protected] to install Python3.10 on my Mac. However, when I'm in Terminal and type python and then press Tab, it is only giving me the option for the Python 3 that's located in my /usr/bin/ How do I enter the 3.10 interpreter that's located in /opt/homebrew/Cellar/



Solution 1:[1]

Running brew info [email protected] will give you the solution to your problem:

If you need to have [email protected] first in your PATH, run:
  echo 'export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ortomala Lokni