在更新python到最新版本时出现错误。
brew update && brew upgrade python
9.0_2/Frameworks/Python.framework/Python
/usr/local/Frameworks/Python.framework/Resources -> /usr/local/Cellar/python@3.9/3.9.0_2/Frameworks/Python.framework/Resources
Error: Could not symlink Frameworks/Python.framework/Versions/3.9/Headers
Target /usr/local/Frameworks/Python.framework/Versions/3.9/Headers
is a symlink belonging to python@3.9. You can unlink it:
brew unlink python@3.9
To force the link and overwrite all conflicting files:
brew link --overwrite python@3.9
解决上述问题。就像下面的命令一样,尝试使用覆盖链接。
brew link --overwrite python@3.9
它修复了我的问题。