9

zsh : command not found pip3 的解决方案

 3 years ago
source link: https://www.jianshu.com/p/2fbbe002a3af
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

zsh : command not found pip3 的解决方案

2020.08.27 17:50:32字数 190阅读 468

zsh 中执行 pip xxx ,出现错误 zsh: command not found: pip3 。 当然我很确定自己是有安装 pip3 的,应该是应该切换了shell,导致环境变量出了问题。

我后来在 issue 3565 上找到了解决方案:https://github.com/pypa/pip/issues/3565

先执行 sudo apt-get install --reinstall python3-pip

之所以reinstall是因为虽然安装了,但是可能某些文件等之类的缘故,–reinstall 将会重写所有的文件覆盖这个包。

查看是否安装成功 pip3 -V

搞定 pip3 过后,再回头升级 pip 即可。

再执行 pip3 install --upgrade pip

接着 pip --version 即可。

来源:
https://www.cnblogs.com/ECJTUACM-873284962/p/10702688.html


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK