Python从已安装的模块中丢失DLL

时间:2018-03-07 14:02:25

标签: python dll module

我有一个由Python和C ++组成的项目。我不了解所有这些但是为了编译和运行所有内容,我运行了一个包含的BAT文件。我已经安装了所需的依赖项。现在当我运行脚本时,我得到了这个:

    MainProcess - [INFO] os_utils: Disabling idle sleep not supported on this OS version.
world - [ERROR] launchables.world: Process Capture crashed with trace:
Traceback (most recent call last):
  File "C:\work\pupil\pupil_src\launchables\world.py", line 118, in world
    from plugin_manager import Plugin_Manager
  File "C:\work\pupil\pupil_src\shared_modules\plugin_manager.py", line 15, in <module>
    from video_capture import Base_Manager, Base_Source
  File "C:\work\pupil\pupil_src\shared_modules\video_capture\__init__.py", line 36, in <module>
    from .file_backend import FileCaptureError, FileSeekError
  File "C:\work\pupil\pupil_src\shared_modules\video_capture\file_backend.py", line 13, in <module>
    import av
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python36\lib\site-packages\av\__init__.py", line 9, in <module>
    from av._core import time_base, pyav_version as __version__
ImportError: DLL load failed: The specified module could not be found.

它无法找到pyav?但如果我跑:

C:\Users\XXX\Downloads>pip install av-0.3.1-cp36-cp36m-win_amd64.whl
Requirement already satisfied: av==0.3.1 from file:///C:/Users/XXX/Downloads/av-0.3.1-cp36-cp36m-win_amd64.whl in c:\users\anton\appdata\local\programs\python\python36\lib\site-packages

我已经安装了它。这里有什么问题?

如果我打开... site-packages \ av__init __。py&#34;我可以看到这个: from av._core import time_base, pyav_version as __version__

这是什么东西?

1 个答案:

答案 0 :(得分:0)

我怀疑该模块已成功安装,但是与FFMPEG动态链接。您可以从他们的网站(https://www.ffmpeg.org/download.html)获取FFMPEG的内置发行版。它们提供静态链接和动态链接的构建,但它将是动态链接的构建,提供您需要的dll。看看我自己的PyAV副本,似乎是当前发布的版本(3.4.2)与它相关联的版本。

下载时,它的名称将为ffmpeg-date-build-win64-shared。在bin目录中,您将找到所有相关的DLL。您可以将此目录添加到PATH,或者更轻松地将DLL复制到您的python位置。