facebookresearch / nougat

Implementation of Nougat Neural Optical Understanding for Academic Documents
https://facebookresearch.github.io/nougat/
MIT License
8.98k stars 567 forks source link

Replit installation fails with OpenCV loader #141

Open AbhigaelCarranza opened 1 year ago

AbhigaelCarranza commented 1 year ago

The package installed correctly but whe I tried to used it I got this error:

Traceback (most recent call last):
  File "/home/runner/ImageCaptioningAITutor/.pythonlibs/bin/nougat", line 5, in <module>
    from predict import main
  File "/home/runner/ImageCaptioningAITutor/.pythonlibs/lib/python3.10/site-packages/predict.py", line 18, in <module>
    from nougat import NougatModel
  File "/home/runner/ImageCaptioningAITutor/.pythonlibs/lib/python3.10/site-packages/nougat/__init__.py", line 7, in <module>
    from .model import NougatConfig, NougatModel
  File "/home/runner/ImageCaptioningAITutor/.pythonlibs/lib/python3.10/site-packages/nougat/model.py", line 16, in <module>
    import cv2
  File "/home/runner/ImageCaptioningAITutor/.pythonlibs/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/home/runner/ImageCaptioningAITutor/.pythonlibs/lib/python3.10/site-packages/cv2/__init__.py", line 111, in bootstrap
    load_first_config(['config.py'], True)
  File "/home/runner/ImageCaptioningAITutor/.pythonlibs/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.
OrianeN commented 1 year ago

Hi, I've had some issues with OpenCV installation in the past, but not this time. Maybe this issue could help you ? https://github.com/opencv/opencv/issues/14064