Artificial Neural Networks and Deep Learning 2021 - Homework 1 Forum

Go back to competition Back to thread list Post in this thread

> import cv2 failed

I tried to import cv2 in my model.py but the submission was refused. However, in the list of libraries opencv-python is present. Am I making any mistakes?

Log error:
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
Traceback (most recent call last):
File "/multiverse/storage/lattari/Prj/phd/AN2DL/Competition_1_running_dir/worker_gpu0_dir/tmp/codalab/tmpYFaxhi/run/program/score.py", line 106, in
from model import model # example model, in scikit-learn style
File "/multiverse/storage/lattari/Prj/phd/AN2DL/Competition_1_running_dir/worker_gpu0_dir/tmp/codalab/tmpYFaxhi/run/input/res/model.py", line 5, in
import cv2
File "/usr/local/lib/python3.6/dist-packages/cv2/__init__.py", line 180, in
bootstrap()
File "/usr/local/lib/python3.6/dist-packages/cv2/__init__.py", line 152, in bootstrap
native_module = importlib.import_module("cv2")
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Posted by: lolloz98 @ Nov. 16, 2021, 6:29 p.m.

There is a problem with the installation of opencv in CodaLab. Please avoid using it. Supposing that you need cv2 to perform operations on images, you can use Pillow as alternative.

Posted by: an2dl.competitions @ Nov. 17, 2021, 9:13 a.m.
Post in this thread