2

Background

After running brew install python3 on Mac, I expect there are symbolic of python3 in /usr/local/bin, but there aren't.

Checked with brew info python3, it shows

python has been installed as /usr/local/bin/python3

Also, python3 is indeed installed in /usr/local/Cellar/python/3.7.7/bin

Could anyone know how to fix this issue without making links to /usr/local/bin manually?

This article in SO reported the same issue, but it has no solution.

Also Found an issue reported.

Update

After running commands below, it does have correct links in /usr/local/bin.

brew uninstall python3
brew install python3
user
  • 1,220
  • 1
  • 12
  • 31
  • Check https://stackoverflow.com/questions/19340871/how-to-link-home-brew-python-version-and-set-it-as-default and https://stackoverflow.com/questions/42454926/homebrew-cannot-link-python Also, I see no reason not to create the link manually. –  Mar 16 '20 at 18:10
  • Did you try `brew link python3` ? – C S Mar 16 '20 at 18:11
  • I tried `brew link python`, but it does link system wide python to python3. Therefore, I did `brew unlink python@2`, it seems backing to the original. I am just wondering how to make symbolic links in `/usr/local/bin` correctly by homebrew itself. – user Mar 16 '20 at 18:19

1 Answers1

0
# Overwrite any python 3 brew symlink
brew link --overwrite python3
# Link python3 to python2 using prior symlink to symlink
ln -s /usr/local/bin/python3 /usr/local/bin/python
atothek
  • 1
  • 1