Homebrew - What's the difference between `python@3` and `python3`?

一世执手 提交于 2019-12-11 06:53:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!