cx_Freeze unable fo find mkl: MKL FATAL ERROR: Cannot load mkl_intel_thread.dll

我与影子孤独终老i 提交于 2019-12-11 04:47:43

问题


I am struggling trying to generate a python executable on Windows 10. I have already tried the solution proposed in Cannot load mkl_intel_thread.dll on python executable and many variations, but still getting the error.

My setup.py:

from cx_Freeze import setup, Executable

additional_mods = ["numpy", "pandas", "spacy"]
# Dependencies are automatically detected, but it might need
# fine tuning.
# buildOptions = dict(packages=[], excludes=[], includes=additional_mods)
buildOptions = dict(packages=additional_mods, excludes=[])

base = "Console"

executables = [Executable("app.py", base=base)]


setup(
    name="bpo",
    version="1.0",
    description="",
    options=dict(build_exe=buildOptions),
    executables=executables,
)

What could be happening? mkl is installed and I have copied its content to the lib path as the answer proposed.

I have also tried to set all these variables to 1, as specified in Troubleshooting section of the anaconda docs without luck:

    CONDA_DLL_SEARCH_MODIFICATION_ENABLE
    CONDA_DLL_SEARCH_MODIFICATION_DEBUG
    CONDA_DLL_SEARCH_MODIFICATION_NEVER_ADD_WINDOWS_DIRECTORY
    CONDA_DLL_SEARCH_MODIFICATION_NEVER_ADD_CWD

回答1:


Try to copy the mkl_* dependencies to the build directory itself instead of the build/lib.

You can let cx_Freeze include the necessary file(s) by using the include_files list of the build_exe options.



来源:https://stackoverflow.com/questions/57493584/cx-freeze-unable-fo-find-mkl-mkl-fatal-error-cannot-load-mkl-intel-thread-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!