jiyujie2006 / jiyujie

0 stars 0 forks source link

如何通过python来批量升级已安装的库 #1

Open jiyujie2006 opened 5 years ago

jiyujie2006 commented 5 years ago

import pip from subprocess import call from pip._internal.utils.misc import get_installed_distributions for dist in get_installed_distributions(): call("pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade " + dist.project_name, shell=True)