bug#68953: OpenCV Python package throws error

2024-02-07 Thread Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
Hello,

I think this can be closed as it was my mistake as some package
installed with pip
installed OpenCV and Python was picking it up by mistake, sorry for the noise.

However, I came up with a patch to propagate python-numpy as it is required by
OpenCV.

-- 
Jean-Pierre De Jesus DIAZ
Foundation Devices, Inc.





bug#68953: OpenCV Python package throws error

2024-02-06 Thread Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
The current OpenCV package (opencv@4.8.0) fails to load on a pure GNU
Guix system, the error reports that some part of OpenCV isn't able to
find the libGL.so.1 library.

My GNU Guix description:

Generation 83Feb 05 2024 16:30:36(current)
  guix a3df20d
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: a3df20db8c3b9c819db7ca29bf014e2544e389d4

To reproduce the issue

guix shell python \
   python-numpy \
   opencv \
   --pure \
   -- python3 -c 'import cv2'

And shows the following error:

Traceback (most recent call last):
  File "", line 1, in 
  File "/home//.local/lib/python3.10/site-packages/cv2/__init__.py",
line 181, in 
bootstrap()
  File "/home//.local/lib/python3.10/site-packages/cv2/__init__.py",
line 153, in bootstrap
native_module = importlib.import_module("cv2")
  File 
"/gnu/store/8s8k2v6b5b7lyf5y5n534cjd9sipgas6-python-3.10.7/lib/python3.10/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

I tried investigating why the error happened without luck as I'm not sure
in what place OpenCV is trying to load libGL.so.1.

-- 
Jean-Pierre De Jesus DIAZ
Foundation Devices, Inc.