OpenCV error | unable to run

Hi all,

I’m getting the following error when running

Traceback (most recent call last):
  File "main.py", line 1, in <module>
    import cv2
  File "/home/runner/SpryOnlySales/venv/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/home/runner/SpryOnlySales/venv/lib/python3.10/site-packages/cv2/__init__.py", line 111, in bootstrap
    load_first_config(['config.py'], True)
  File "/home/runner/SpryOnlySales/venv/lib/python3.10/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.
1 Like

Hello and welcome to the forums @sonicx180!

I have moved this topic to #code-help:python.

Please send a link to the Repl or a minimal Repl which reproduces this issue. Thanks!

I’ve gotten this error before, but it only happens with new python repls. If you can’t find any other solutions, just fork this and copy paste your code into it: https://replit.com/@MrVoo/Rock-Paper-Scissors#main.py

1 Like

So should this be a bug report?

Thanks @sonicx180 moved to #bug-reports

6 posts were split to a new topic: Python import opencv