unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#68953: OpenCV Python package throws error
@ 2024-02-06 16:49 Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
  2024-02-07 16:33 ` Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
  2024-02-07 16:35 ` bug#68953: [PATCH] gnu: opencv: Move python-numpy to propagated-inputs Jean-Pierre De Jesus DIAZ via Bug reports for GNU Guix
  0 siblings, 2 replies; 3+ messages in thread
From: Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix @ 2024-02-06 16:49 UTC (permalink / raw)
  To: 68953

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 83    Feb 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 "<string>", line 1, in <module>
  File "/home/<redacted>/.local/lib/python3.10/site-packages/cv2/__init__.py",
line 181, in <module>
    bootstrap()
  File "/home/<redacted>/.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.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#68953: OpenCV Python package throws error
  2024-02-06 16:49 bug#68953: OpenCV Python package throws error Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
@ 2024-02-07 16:33 ` Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
  2024-02-07 16:35 ` bug#68953: [PATCH] gnu: opencv: Move python-numpy to propagated-inputs Jean-Pierre De Jesus DIAZ via Bug reports for GNU Guix
  1 sibling, 0 replies; 3+ messages in thread
From: Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix @ 2024-02-07 16:33 UTC (permalink / raw)
  To: 68953

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.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#68953: [PATCH] gnu: opencv: Move python-numpy to propagated-inputs.
  2024-02-06 16:49 bug#68953: OpenCV Python package throws error Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
  2024-02-07 16:33 ` Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
@ 2024-02-07 16:35 ` Jean-Pierre De Jesus DIAZ via Bug reports for GNU Guix
  1 sibling, 0 replies; 3+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Bug reports for GNU Guix @ 2024-02-07 16:35 UTC (permalink / raw)
  To: 68953; +Cc: Jean-Pierre De Jesus DIAZ

* gnu/packages/image-processing.scm (opencv): Move python-numpy from
INPUTS to PROPAGATED-INPUTS.

Change-Id: If4f0c8fa0cf41594a2c63f3e9f271987aa730af2
---
 gnu/packages/image-processing.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 07ba0297cd..32405fa08c 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -727,6 +727,7 @@ (define-public opencv
            (sha256
             (base32
              "16crcca9r4y4rby0dqdhc06qi84hjk6qxy2sql2dhh35hfs856rr"))))))
+    (propagated-inputs (list python-numpy))
     (inputs
      (list eigen
            ffmpeg-4
@@ -749,7 +750,6 @@ (define-public opencv
            openjpeg
            protobuf
            python
-           python-numpy
            vtk
            zlib))
     ;; These three CVEs are not a problem of OpenCV, see:

base-commit: 10dba10fd6551ab480a38d00301e6f102def674d
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-07 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 16:49 bug#68953: OpenCV Python package throws error Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
2024-02-07 16:33 ` Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
2024-02-07 16:35 ` bug#68953: [PATCH] gnu: opencv: Move python-numpy to propagated-inputs Jean-Pierre De Jesus DIAZ via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).