ImportError: OpenCV loader: missing configuration file: ['config.py']

hi,
I am getting this error in replit, and dont know how to solve it
please help

   import cv2
  File "/home/runner/BugIt/venv/lib/python3.8/site-packages/cv2/_init_.py", line 181, in <module>
    bootstrap()
  File "/home/runner/BugIt/venv/lib/python3.8/site-packages/cv2/_init_.py", line 111, in bootstrap
    load_first_config(['config.py'], True)
  File "/home/runner/BugIt/venv/lib/python3.8/site-packages/cv2/_init_.py", line 109, in load_first_config
    raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames))
ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.

Hey, @rinab301 welcome to the forums!

Can you please provide a link to the repl?

Same error. How do you fix it?

Could you provide the comunity with a link to your repl @SamirRangwalla1 since i don’t think rinab301 is

1 Like

You must fork an older repl that utilizes an older version of OpenCV because the newer version of OpenCV does not function.

Older Repl By @IanAtReplit: https://replit.com/@IanAtReplit/TextExtractionfromImage-Port#main.py

2 Likes