python查看包版本、更新单个包、卸载单个包

查看python某个包的版本?

pip freeze | grep xxx

pip show xxx 

更新单个包

使用 pip 一次性更新所有 Python 软件包并不是一个好主意。我发现一次性更新后,软件包之间的依赖关系被破坏了,所以请确保只更新你想要更新的软件包。

更新单个包,如celery

pip install -U celery

pip install --upgrade  celery

-U:升级 原来已经安装的包,不带U不会装新版本,带上U才会更新到最新版本

-i: 指定库的安装源 清华源

pip install pyyaml -i https://pypi.tuna.tsinghua.edu.cn/simple

卸载某个包

卸载某个包,如numpy

pip uninstall numpy
原文地址:https://blog.csdn.net/inthat/article/details/128131992

相关文章:

  • 2021-12-09
  • 2021-10-14
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
猜你喜欢
  • 2021-12-14
  • 2022-12-23
  • 2022-01-16
  • 2021-11-29
  • 2021-06-06
  • 2021-11-29
相关资源
相似解决方案