之前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)
时间: 2024-11-01 11:07:52