Hello, Thank you so much for the answer!
However.. I still don’t know why I got the same error…
I made a new venv, activated it and installed torch and torchcodec with the commands you gave me and here is the link of the picture
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -U pip
pip install "torch==2.9.*" "torchcodec==0.8.*"
I also installed ffmpeg<8 after installing miniconda3 with the command you gave and I could see some avcodec-*.dll files in the directory C:\Users\majh0\miniconda3\Library\bin like picture below
conda install -y -c conda-forge "ffmpeg<8"
I made a code with Jupyter notebook like picture below and it still gives me same error…
import os
os.system(r'set PATH=C:\Miniconda3\Library\bin;%PATH%')
# os.environ["PATH"] += os.pathsep + r"C:\GPT_AGENT_2025_BOOK\chap05\ffmpeg-2025-10-16-git\bin"
import torch, torchcodec, platform, subprocess
print("torch", torch.__version__, "torchcodec", torchcodec.__version__, "py", platform.python_version())
subprocess.run(["ffmpeg","-version"], check=True)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[21], line 5
2 os.system(r'set PATH=C:\Miniconda3\Library\bin;%PATH%')
3 # os.environ["PATH"] += os.pathsep + r"C:\GPT_AGENT_2025_BOOK\chap05\ffmpeg-2025-10-16-git\bin"
----> 5 import torch, torchcodec, platform, subprocess
7 print("torch", torch.__version__, "torchcodec", torchcodec.__version__, "py", platform.python_version())
9 subprocess.run(["ffmpeg","-version"], check=True)
File c:\GPT_AGENT_2025_BOOK\venv\Lib\site-packages\torchcodec\__init__.py:10
1 # Copyright (c) Meta Platforms, Inc. and affiliates.
2 # All rights reserved.
3 #
(...) 7 # Note: usort wants to put Frame and FrameBatch after decoders and samplers,
8 # but that results in circular import.
9 from ._frame import AudioSamples, Frame, FrameBatch # usort:skip # noqa
---> 10 from . import decoders, samplers # noqa
12 try:
13 # Note that version.py is generated during install.
14 from .version import __version__ # noqa: F401
File c:\GPT_AGENT_2025_BOOK\venv\Lib\site-packages\torchcodec\decoders\__init__.py:7
1 # Copyright (c) Meta Platforms, Inc. and affiliates.
2 # All rights reserved.
3 #
...
FFmpeg version 7: Could not load this library: C:\GPT_AGENT_2025_BOOK\venv\Lib\site-packages\torchcodec\libtorchcodec_core7.dll
FFmpeg version 6: Could not load this library: C:\GPT_AGENT_2025_BOOK\venv\Lib\site-packages\torchcodec\libtorchcodec_core6.dll
FFmpeg version 5: Could not load this library: C:\GPT_AGENT_2025_BOOK\venv\Lib\site-packages\torchcodec\libtorchcodec_core5.dll
FFmpeg version 4: Could not load this library: C:\GPT_AGENT_2025_BOOK\venv\Lib\site-packages\torchcodec\libtorchcodec_core4.dll
[end of libtorchcodec loading traceback].
I actually installed ffmpeg which is under version 8 with the command through miniconda…
I don’t know why this thing still gives me error like this..
Could you please help me more if you don’t mind..? ;(
Thank you so much in advance.