ITADN

Pyinstaller didn't find mkl related dll correctly when package torch

#879Closedtso2381637 创建于 2025-03-18
bug
T
tso2381637commented
**Describe the bug** * Which hook/library isn't working? Torch * Does the error get raised while building or when running? No **Error** ``` 21454 INFO: hook-torch: collecting DLLs from MKL and its dependencies: ['mkl', 'intel-openmp', 'tbb'] 21470 INFO: hook-torch: found MKL DLLs: [] ``` **Expected behavior** Should package mkl, openmp, tbb dll **Desktop (please complete the following information):** - OS: [e.g. Windows/Ubuntu] Windows - Python Version: [e.g. python 3.7] python 3.8.20 - Version of `pyinstaller-hooks-contrib`: [e.g. 2020.4] 2025.1 - Version of PyInstaller [e.g. 4.0] 6.12.0 **Additional context** Add any other context about the problem here. The issue is caused by windows path not correctly matching pattern `../../Library/bin/*.dll`. **Testing Code** ``` import importlib_metadata for file in importlib_metadata.distribution("mkl").files: print(file, file.match(r"../../Library/bin/*.dll")) # output ..\..\Library\bin\libimalloc.dll False ..\..\Library\bin\mkl_avx.1.dll False ..\..\Library\bin\mkl_avx2.1.dll False ..\..\Library\bin\mkl_avx512.1.dll False ..\..\Library\bin\mkl_blacs_ilp64.1.dll False ..\..\Library\bin\mkl_blacs_intelmpi_ilp64.1.dll False ... ```
关闭于 2025-03-18 3 条评论