代码如下:
import os
try:
import winshell
except:
os.system('python -m pip install --upgrade pip')
os.system('pip install pywin32')
os.system('pip install winshell')
import winshell
print('hello world')
我的本意是导入 winshell 这个模块,要是机子里没这个模块的话,就先安装再导入,但是运行的时候报错了

看运行过程,明明的确按计划安装了两个所需的模块,但是接下来又报错说没有 winshell 模块,这是怎么回事?
第二遍运行的话又没问题,说明第一遍的确安装成功了两个模块,但是第一遍的报错是怎么一回事呢?
