# 1、安装更新包代码
import os
ret = os.system(r'pip list --outdated --format=freeze >> D:\t.txt')
with open('./t.txt', 'r', encoding='utf-8') as file_pip:
pip_list = file_pip.readlines()
if pip_list:
for pip_one in pip_list:
pip_one = pip_one.strip()
if pip_one != "":
module, v = pip_one.split("==")
os.system('pip install --user --upgrade {}'.format(module))
print(pip_one)
os.remove(r'D:\t.txt')
2、启动每天定时任务

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
这个是我的代码文件位置,一般不会动这个文件。

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
点击确定就可以,这样每天早上9.20定时更新最新的python安装包了。