Is there any advantage of installing python 3 through homebrew vs through the installer from https://www.python.org/ or vice verse (except that the installer can give me the latest version)?
I try both and I can't find the difference.
---- update ----
I now gain some insights about this question.
- If I install python through the installer, the installer will modify PATH in
.zprofilelike following and create softlink/usr/local/bin/python3
# Setting PATH for Python 3.8
# The original version is saved in .zprofile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
export PATH
# Setting PATH for Python 3.9
# The original version is saved in .zprofile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}"
export PATH
ls -al /usr/local/bin/python3
lrwxr-xr-x 1 root wheel 69 11 20 11:18 /usr/local/bin/python3 ->
../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3
- if I then install python thru brew, brew will complain. Sometimes I don't run
brew install pythondirectly but install some bottle, which installs python, e.gbrew install httpiewill install python, then brew complains
...
==> Caveats
Python has been installed as
/usr/local/bin/python3
Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
/usr/local/opt/python@3.9/libexec/bin
macOS preinstall python at
/usr/bin/python&/usr/bin/python3which remain unchanged. But since PATH is modified by the installer or brew (brew puts/usr/local/binbefore/usr/bin) so preinstall python is shadowed.I do find brew has an "annoying" feature, when brew’s Python being installed as a dependency for a bottle and then I uninstall the bottle, the brew's Python remains. For example I installed httpie and uninstalled it. But to my surprise my system python is still the one installed by httpie. It took me quite sometimes to figure out that.
MacPortsinstead of homebrew is quite helpful. :) – Seamus Oct 11 '20 at 23:32apt(Debian's package manager), andaptis quite good. And I like beer as much as the next person, but all of the beer jargon homebrew uses never made sense to me. Wrt your question about any advantage of direct install vs a package manager, I think that advantage becomes clear once you get more than 2 or 3 packages installed: it's convenience. You have one interface to update all your packages instead of having to update them manually yourself. – Seamus Oct 12 '20 at 04:37