[英]After installing python3 with Homebrew, Homebrew doesn't create symlink of python in /usr/bin/local
After running brew install python3
on Mac, I expect there are symbolic of python3 in /usr/local/bin
, but three aren't.在 Mac 上运行
brew install python3
后,我希望/usr/local/bin
中有 python3 的符号,但三个没有。
Checked with brew info python3
, it shows检查
brew info python3
,它显示
python has been installed as /usr/local/bin/python3
Also, python3 is indeed installed in /usr/local/Cellar/python/3.7.7/bin
另外,python3 确实安装在
/usr/local/Cellar/python/3.7.7/bin
Could anyone know how to fix this issue without making links to /usr/local/bin
manually?谁能知道如何在不手动链接到
/usr/local/bin
的情况下解决此问题?
This article in SO reported the same issue, but it has no solution. SO中的这篇文章报告了同样的问题,但没有解决方案。
Also Found an issue reported.还发现报告的问题。
After running commands below, it does have correct links in /usr/local/bin
.运行下面的命令后,它在
/usr/local/bin
中确实有正确的链接。
brew uninstall python3
brew install python3
# 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.