I have changed my python code to an .exe file using pyinstaller and anaconda. In my python script ("untitled.py") I import opencv which I have already installed from source using cmake. After creating exe file I run untitled.exe in cmd windows. However, I get the following error:
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module File "cv2_init_.py", line 96, in File "cv2_init_.py", line 58, in bootstrap File "cv2_init_.py", line 56, in load_first_config ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.
There is config.py in OpenCV folder, but it cannot be found. I tried this:
pyinstaller -F --hidden-import ‘OpenCV’ untitled.py
But still does not work. I wanted to ask how I can solve this issue?