ImportError: libICE.so.6: cannot open shared object file: No such file or directory

Marco Ceccon

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

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

ImportError: libSM.so.6: cannot open shared object file: No such file or directory

Anaconda ImportError: libSM.so.6: cannot open shared object file: No such file or directory

ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory Tensorflow

Tensorflow shared library error; ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

ImportError: libc10.so: cannot open shared object file: No such file or directory

ImportError: libopencv_hdf.so.4.5: cannot open shared object file: No such file or directory

ImportError libdynet.so: cannot open shared object file, No such file or directory

Tensorflow: ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory

ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory

ImportError: libtk8.6.so: cannot open shared object file: No such file or directory

ImportError: libta_lib.so.0: cannot open shared object file: No such file or directory

ImportError: libGL.so.1: cannot open shared object file: No such file or directory while importing OCC

ImportError: libcudart.so.7.0: cannot open shared object file: No such file or directory

ImportError: libavcodec.so.56: cannot open shared object file: No such file or directory

ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory

ImportError: libgomp.so.1: cannot open shared object file: No such file or directory

Tensorflow: ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory

ImportError: libopencv_hdf.so.3.1: cannot open shared object file: No such file or directory

ImportError: /home/dminstalluser/script/lib/prctl.so: cannot open shared object file: No such file or directory

ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory

ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory

ImportError: libboost_python.so.1.65.1: cannot open shared object file: No such file or directory

ImportError: libcblas.so.3: cannot open shared object file: No such file or directory

Jupyter: ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory

ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory

ImportError: libpng16.so.16: cannot open shared object file: No such file or directory

ImportError: libtinfo.so.5: cannot open shared object file: No such file or directory

ImportError: libcublas.so.9.0: cannot open shared object file

libffi.so.6: cannot open shared object file: No such file or directory