我正在尝试构建一个导入 ffpyplayer 的 python 应用程序的 exe,但出现以下错误:
line 493, in exec_module
exec(bytecode, module.__dict__)
File "ffpyplayer\player\__init__.py", line 10 in <module>
ImportError: DLL load failed while importing player: the specified module could not be found.
在我的 pyinstaller 安装脚本中,我尝试包含以下隐藏的导入,以查看是否可以修复它,但它不起作用:
PyInstaller.__main__.run([
r'--hidden-import=ffpyplayer.player',
r'--hidden-import=ffpyplayer.player.player',
my_script_path
])
ffplayer.player.__init__.py
的第 10 行显示为 from ffpyplayer.player.player import MediaPlayer
,但将其作为隐藏导入包含在上面并不能解决问题。
ffpyplayer.__init__.py
有几行代码链接到包含 c:\users\me\appdata\local\programs\python\python38\share\ffpyplayer
、ffmpeg
和 sdl
中的一些 dll 的文件夹。根据我在类似问题中读到的内容,我认为这可能与问题有关,但现在我该如何处理这些文件夹?