PIP 批量更新改为清华这边的镜像更新
之前pip批量更新的时候发现有些包无法更新,而且速度也特别慢,今天尝试了下清华的镜像,速度是真快
# coding=utf-8
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade " + dist.project_name, shell=True)