Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 bash 命令来升级我安装的所有 pip 包。
命令是:
pip3 list --outdated | cut -d' ' -f1 | tail -n +3 | xargs pip3 install --upgrade
问题是,如果其中一个包升级失败,它会回滚删除成功升级的包的升级。
有没有办法用一个命令来升级所有过时的包,丢弃一些包的失败?
我稍微修改了链接副本中发布的命令。
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U --user