0

I know it has already been asked here but the answer didn't helped me.

I installed via pip opencv-python imported it and obviously used it and on my local machine everything works. Then I pushed the code on heroku and this error came up:

Traceback (most recent call last):
File "server.py", line 7, in <module>
from pre_img import process_image
File "/app/pre_img.py", line 3, in <module>
import cv2
File "/app/.heroku/python/lib/python3.6/site-packages/cv2/__init__.py", line 5, in <module>
from .cv2 import *
ImportError: libICE.so.6: cannot open shared object file: No such file or directory

This is my requirements.txt file:

flask
pytesseract
opencv-python

And this is my Aptfile:

tesseract-ocr
tesseract-ocr-all
libsm6
libxext6
libxrender-dev
python-qt4

What can I do to fix this? Thank you in advance!

Marco Ceccon
  • 47
  • 2
  • 8

1 Answers1

0

I fixed it. I modified the Aptfile from:

tesseract-ocr
tesseract-ocr-all
libsm6
libxext6
libxrender-dev
python-qt4

to:

tesseract-ocr
tesseract-ocr-all
libsm6
libxrender1
libfontconfig1
libice6
Marco Ceccon
  • 47
  • 2
  • 8