mac zsh: command not found: pip 解决方法
第一步先下载:
curl https://bootstrap.pypa.io/pip/get-pip.py -o get-pip.py
第二步安装:
sudo python3 get-pip.py
(注意,如果出现如下图黄字部分警告,如WARNING: The scripts pip, pip3 and pip3.9 are installed in ‘/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/bin’ which is not on PATH)需要将其添加到path
![](https://img2022.cnblogs.com/blog/1936475/202206/1936475-20220628125219906-8915598.png)
将你的黄色警告的文件目录部分更换下面PATH=后的目录部分
echo 'export PATH=/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/bin:$PATH' >>~/.bashrc
使文件生效
source ~/.bashrc