问题
I have python 2.7.14 installed via homebrew, and I'd like to install the latest version of python 3 via homebrew as well. When I search for "python3" I see the following results.
$ brew search python3
==> Formulae
boost-python3 python3 python@3
If you meant "python3" specifically:
It was migrated from homebrew/cask to homebrew/core.
Why is there both python@3
and python3
? What's the difference?
回答1:
Right now, there are only two distinct Formula for Python in homebrew-core: python, and python@2.
python@3
and python3
are both aliases to Formula/python.rb
. Thus, they're just different names that install the same package.
See the two aliases:
- Aliases/python@3
- Aliases/python3
...both pointing to:
- Formula/python.rb
To find this yourself, use brew info
-- for example, brew info python@3
-- and look for the From:
line with a URL to the formula which was used. For example, this line might look like:
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb
来源:https://stackoverflow.com/questions/51971477/homebrew-whats-the-difference-between-python3-and-python3