win32ctypes.pywin32.pywintypes.error: (2, 'LoadLibraryExW', '系统找不到指定的文件。')

1,071 阅读1分钟

背景

在使用pyinstaller打包python程序时,出现以上报错。结合我的情况,说一说解决办法。

使用条件

1、在python虚拟环境中进行打包

报错原因

pyinstaller使用全局安装,然而却在虚拟环境中使用打包

解决办法

在虚拟环境中进行pyinstaller的安装然后进行打包。