$ brew rm python 
$ brew rm python3 
$ rm -rf /usr/local/opt/python
$ rm -rf /usr/local/opt/python3
$ brew prune 
$ brew install python3
$ brew postinstall python3

python目录根据情况来删除,后重装 

prune [--dry-run]: Remove dead symlinks from the Homebrew prefix. This is generally not needed, but can be useful when doing DIY installations.

doctor: Check your system for potential problems.

Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with macOS.

参考地址:

1. https://stackoverflow.com/questions/20082935/how-to-install-pip-for-python-3-on-mac-os-x

2. https://docs.brew.sh/Manpage

 

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐