decord icon indicating copy to clipboard operation
decord copied to clipboard

failed to run on ubuntu 22.04

Open AlbertZhangHIT opened this issue 11 months ago • 2 comments

Hi, I installed decord on ubuntu 22.04 following the guide, but it failed running with popping up errors like

    import decord
  File "/root/.local/lib/python3.10/site-packages/decord-0.6.0-py3.10-linux-aarch64.egg/decord/__init__.py", line 4, in <module>
    from ._ffi.runtime_ctypes import TypeCode
  File "/root/.local/lib/python3.10/site-packages/decord-0.6.0-py3.10-linux-aarch64.egg/decord/_ffi/runtime_ctypes.py", line 8, in <module>
    from .base import _LIB, check_call
  File "/root/.local/lib/python3.10/site-packages/decord-0.6.0-py3.10-linux-aarch64.egg/decord/_ffi/base.py", line 47, in <module>
    _LIB, _LIB_NAME = _load_lib()
  File "/root/.local/lib/python3.10/site-packages/decord-0.6.0-py3.10-linux-aarch64.egg/decord/_ffi/base.py", line 39, in _load_lib
    lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
  File "/root/miniconda3/envs/torch/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /lib/aarch64-linux-gnu/libavfilter.so.7: undefined symbol: av_timecode_make_smpte_tc_string2, version LIBAVUTIL_56

I have no ideas how to solve this. Could someone help me out?

AlbertZhangHIT avatar Feb 05 '25 04:02 AlbertZhangHIT

I figured it out that it was caused by torchvision 0.16.0 since the video_reader.so in torchvision depends on its library libavutil.c2c2d4cc.so.56 in torchvision.libs, which was loaded first if torchvision is imported before decord.

Does someone has a solution? Thanks a lot.

AlbertZhangHIT avatar Feb 05 '25 09:02 AlbertZhangHIT

Switching import order worked for me. See https://github.com/dmlc/decord/issues/329

gerrylwk avatar Mar 03 '25 09:03 gerrylwk