太坑了,更新到 python 3.8 ,一些库的dll突然就找不到了。
参照链接
https://stackoverflow.com/questions/58631512/pywin32-and-python-3-8-0/58632354#58632354
ctypes.cdll.LoadLibrary
python 3.8 之后,ctypes 加载 dll 时不再依赖 环境变量PATH。
修改PATH没用了。
现在需要使用 os.add_dll_directory
import os
os.add_dll_directory(dll_folder_path)