Think before you speak, read before you think.

brew 切换 python 版本

切换 python 至 3.6.5

brew list python --versions
brew switch python 3.6.5

升级 python3

brew install python3

link 切换

➜  ✗ brew link python
Linking /usr/local/Cellar/python/3.7.7... 
Error: Could not symlink Frameworks/Python.framework/Headers
Target /usr/local/Frameworks/Python.framework/Headers
is a symlink belonging to python@2. You can unlink it:
  brew unlink python@2
解除 python@2 link
Unlinking /usr/local/Cellar/python@2/2.7.17... 34 symlinks removed


To force the link and overwrite all conflicting files:
  brew link --overwrite python

To list all files that would be deleted:
  brew link --overwrite --dry-run python
➜  ✗ brew link python --overwrite python
Linking /usr/local/Cellar/python/3.7.7... 28 symlinks created

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *