用bash升级python第三方库

来源:互联网 发布:易语言网络爬虫 编辑:程序博客网 时间:2024/06/13 12:01

用bash升级python第三方库

用pip逐个升级Python第三方库,要重复写很多命令。这个bash文件先检验哪些库需要升级,然后提示输入要升级的库名。使用方便。

#!/bin/sh# update the packages of pythonpip3 list --format columns --outdatewhile truedo    read -p "please input module name: (input q to quit) " module    if [ $module == q ]   # to quit    then        echo "finished."        break    else        pip3 install --upgrade $module    fidone
0 0
原创粉丝点击