I have a python program that runs fine on one machine. On another machine, I always get an import error. After
- uninstalling python,
- uninstalling all pip package,
- reinstalling a new version of python,
- rebooting,
- reinstalling all pip packages
Nothing changed for me. I am faced with exactly the same error
Traceback (most recent call last):
File "c:\project\openTemplates.py", line 8, in <module>
from python_imagesearch.imagesearch import imagesearch
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\python_imagesearch\imagesearch.py", line 1, in <module>
import cv2
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\cv2\__init__.py", line 181, in <module>
bootstrap()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\cv2\__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: DLL load failed while importing cv2: The specified module could not be found.
What can I do to solve this. I don't understand what module is missing. From the error message I can see that cv2 is clearly there in the file system in the expected place.
In particular, how does one go about finding what is the specified module which could not be found?