Skip to content

ImportError: DLL load failed while importing _core: The specified module could not be found. #1270

@vutung1671997

Description

@vutung1671997

Can't use av after build from source

Expected behavior

Build success from source at main

Actual behavior

i'm running with tutorial build in Readme

git clone git@github.com:PyAV-Org/PyAV
cd PyAV
source scripts/activate.sh
pip install --upgrade -r tests/requirements.txt
pip install wheel
python setup.py build --ffmpeg-dir=C:\ffmpeg

build success then run:
python setup.py install

Next run python:
python
import av

Before that:
Added env variable: C:\ffmpeg\lib, C:\ffmpeg\include, C:\ffmpeg, C:\ffmpeg\bin

OR build to whl, tar.gz and pip install av-11.0.0... ...whl install successfully but still error DLL

123

Build report:
...
Creating library build\temp.win-amd64-cpython-312\Release\src\av\video\stream.cp312-win_amd64.lib and object build\temp.win-amd64-cpython-312\Release\src\av\video\stream.cp312-win_amd64.exp
Generating code
Finished generating code
...

...
After import av and run error occur:

Traceback (most recent call last):
File "", line 1, in
File "E:\PyAV\av_init_.py", line 20, in
from av._core import time_base, library_versions
ImportError: DLL load failed while importing _core: The specified module could not be found.
...

Versions

  • OS: Windows 10 Pro 19045.3803

  • PyAV runtime: 11.0.0

  • PyAV build: from main branch

  • FFmpeg: C:/ffmpeg

Research

I have done the following:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions