python更新pip命令_Python中pip更新方法
在cmd命令提示符中使用 pip 命令时,比如输入pip list(列出已安装包),可能会出现以下警告:提示你需要更新 pip 版本怎么办?其实警告的这段文字已经告诉你该怎么做了You should consider upgrading via the 'python -m pip install --upgrade pip' command.只要输入 python -m pip install
·
在cmd命令提示符中使用 pip 命令时,比如输入pip list(列出已安装包),可能会出现以下警告:
![91b64c563dcdb2f7602449a5d4198c23.png](https://img-blog.csdnimg.cn/img_convert/91b64c563dcdb2f7602449a5d4198c23.png)
提示你需要更新 pip 版本
怎么办?
其实警告的这段文字已经告诉你该怎么做了You should consider upgrading via the 'python -m pip install --upgrade pip' command.
只要输入
python -m pip install --upgrade pip
就能对 pip 进行更新
但是有可能出现以下情况:
![3268c65009e394206a7bbc9ceac7b621.png](https://img-blog.csdnimg.cn/img_convert/3268c65009e394206a7bbc9ceac7b621.png)
又出现了一个红色标注的错误Error,但在报错的同时,也提供了解决办法:Consider using the `--user` option or check the permissions.
所以可以输入以下命令:
pip install --user --upgrade pip
![dd4ae2836ef504411a49863b547aa2f9.png](https://img-blog.csdnimg.cn/img_convert/dd4ae2836ef504411a49863b547aa2f9.png)
可以看到提示:成功安装 pip-20.3.3
再次输入 pip list 查看版本就不会有警告了
![499fea49c9b5b92fc19d43fd80bc0cca.png](https://img-blog.csdnimg.cn/img_convert/499fea49c9b5b92fc19d43fd80bc0cca.png)
更多推荐
所有评论(0)