pyinstaller ffpyplayer ImportError DLL 加载失败

时间:2021-07-17 20:21:04

标签: python pyinstaller

我正在尝试构建一个导入 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\ffpyplayerffmpegsdl 中的一些 dll 的文件夹。根据我在类似问题中读到的内容,我认为这可能与问题有关,但现在我该如何处理这些文件夹?

0 个答案:

没有答案
相关问题