You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When comparing the lib/cv2 folder produced by cx_Freeze to lib/site-packages/cv2 in a python environment, the files config.py and config-{python_version}.py (config-3.8.py in my case) are missing.
From this issue, it seems that recent updates to opencv-python have made it more difficult for tools to infer what files are required. Adding the following to hooks.py makes things work, but I don't know enough about cx_Freeze to say whether this does things in the right way, or even if it works beyond my machine.
Describe the bug
After building an executable which depends on the latest (4.5.4) version of opencv-python, this error ocurrs on running:
ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.
When comparing the
lib/cv2
folder produced by cx_Freeze tolib/site-packages/cv2
in a python environment, the filesconfig.py
andconfig-{python_version}.py
(config-3.8.py
in my case) are missing.From this issue, it seems that recent updates to opencv-python have made it more difficult for tools to infer what files are required. Adding the following to
hooks.py
makes things work, but I don't know enough about cx_Freeze to say whether this does things in the right way, or even if it works beyond my machine.To Reproduce
This bug is present for any application build with opencv-python>=4.5.4 as a dependency.
Expected behavior
I expected things to work the same as when I was using version 4.5.3
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: