Module not found with Python3.9 on Windows
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
I finally managed to compile using VS2022, CUDA and ffmpeg - works like a charm and it's super fast.
Just wanted to share a couple of gotchas that I found during the installation, let me know if I should update the documentation.
The cmake command for VS2022 with CUDA is:
> cmake.exe -DCMAKE_CXX_FLAGS="/DDECORD_EXPORTS" -DUSE_CUDA=ON -DCMAKE_CONFIGURATION_TYPES="Release" -A x64 -G "Visual Studio 17 2022" ..
This has an implicit requirement on the NVIDIA Video Codec SDK, it tells you about this during the installation, but a quick link in the requirements to [the official download page](https://developer.nvidia.com/nvidia-video-codec-sdk) could be useful.
This also requires FFMPEG v4 (!), I accidentally installed 5 instead and there were a couple of mentions in other issues too, eg #186
After compiling this I was able to install normally using setuptools. Running however caused this error:
> Could not find module 'long_path\decord.dll'. Try using the full path with constructor syntax.
The dll definitely exists, apparently starting with python 3.8 below call:
https://github.com/dmlc/decord/blob/d2e56190286ae394032a8141885f76d5372bd44b/python/decord/_ffi/base.py#L39
needs to pass another argument:
> lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL, winmode=0)
Courtesy of https://stackoverflow.com/a/64472088/540873
And last but not least, I had a runtime error with CUDA:
> [CUDA error: the provided PTX was compiled with an unsupported toolchain](https://forums.developer.nvidia.com/t/cuda-error-the-provided-ptx-was-compiled-with-an-unsupported-toolchain/185754)
This came from using a never built from the Video Codec that I just installed than my driver supported. Updating the driver, restarting and compiling again made this project work end2end.
Let me know if I should put together a documentation update for the project and a fix for the CDLL call.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.