FS#46740 - [opencv-samples] sample python program requires python2-numpy to operate

Attached to Project: Arch Linux
Opened by Colin Heinzmann (DepthDeluxe) - Thursday, 15 October 2015, 18:05 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 06 January 2019, 15:06 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ray Rashif (schivmeister)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When attempting to run "facerec_demo.py" in the opencv samples folder (i.e. /usr/share/opencv/samples/python2) when the python2-numpy package is not installed on the system, user gets an ImportError related to a numpy module. When I install python2-numpy, the program runs correctly.

Additional info:
package: opencv-samples 2.4.12.2-1
file location: /usr/share/opencv/samples/python2/facerec_demo.py

Steps to reproduce:
1. Ensure python2-numpy is not installed on the system.
2. Run "python2 /usr/share/opencv/samples/python2/facerec_demo.py"

Program Error Output:
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
File "facerec_demo.py", line 42, in <module>
import cv2
ImportError: numpy.core.multiarray failed to import
This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 06 January 2019, 15:06 GMT
Reason for closing:  Deferred
Additional comments about closing:  current opencv only supports python3
Comment by Ray Rashif (schivmeister) - Friday, 16 October 2015, 08:46 GMT
Thanks for the report. We actually have that optional dependency in opencv itself (in fact, I unset optdepends in -samples), but perhaps it's better to also have it in the samples package. Makes sense.

Loading...