增加upgrade-all.py脚本 用于升级env工具的模块

在env终端里敲入 python upgrade-all.py即可自动升级
如果requests模块版本过低,很容易导致pkgs --update的时候下载不下来软件包
This commit is contained in:
Meco Man 2022-08-12 02:52:13 -04:00
parent 6a684387df
commit 0775337b29
1 changed files with 7 additions and 0 deletions

7
upgrade-all.py Normal file
View File

@ -0,0 +1,7 @@
import pip
from subprocess import call
from pip._internal.utils.misc import get_installed_distributions
if __name__=='__main__':
for dist in get_installed_distributions():
call('pip install --upgrade '+dist.project_name,shell=True)