不省心的Openssh和Pip

pip出现以下错误

1
2
3
4
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 6, in <module>
from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip._internal.cli.main'

经过排查应该是brew install openssh之后安装了python3.8的包导致的

卸载Openssh

利用rmtree卸载Openssh及其依赖

1
2
brew tap beeftornado/rmtree
brew rmtree openssh

Pip修复

python3 -m pip install --upgrade pip --user

我就想试试,没别的意思!