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/[email protected]/Frameworks/Python.framework/Versions/3.9/bin’ which is not on PATH)需要将其添加到path
image.png
将你的黄色警告的文件目录部分更换下面PATH=后的目录部分
echo 'export PATH=/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/bin:$PATH' >>~/.bashrc
使文件生效
source ~/.bashrc
在控制台输入pip或pip3显示正常
2人点赞 Python 更多精彩内容,就在简书APP 标签:get,Python,py,命令,mac,pip,PATH,3.9 From: https://www.cnblogs.com/kylin5201314/p/16639559.htmlimage.png