opencv / opencv/opencv-python

ImportError: DLL load failed while importing cv2: The specified module could not be found.

Aperta
#856 32 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
5.4k
Fork
1k
Merge medio
22h 17m
PR unite (30g)
3

Descrizione

Hi,
I installed opencv-contrib-python 4.7.0.72 using pip for python 3.11.4 on Windows 10 x86-64
But when I run I get this exceptiom DLL load failed while importing cv2: The specified module could not be found.

Expected behaviour

I expect the module to import and not trow an error.

Actual behaviour

This exception gets trown

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python311\Lib\site-packages\cv2\__init__.py", line 181, in <module>
    bootstrap()
  File "C:\Python311\Lib\site-packages\cv2\__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: DLL load failed while importing cv2: The specified module could not be found.
Steps to reproduce
  • example code
    import cv2
  • operating system
    Windows 10, i7-12700H with Intel Iris Xe Graphics and a NVIDIA RTX A1000
  • architecture (e.g. x86)
    x86-64
  • opencv-python version
    opencv-contrib-python-4.7.0.72
Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • I'm using the latest version of opencv-python

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo import cv2 con Python 3.11.4, Windows 10 x86-64 e opencv-contrib-python 4.7.0.72. Leggi il percorso di bootstrap in cv2/__init__.py e analizza l’errore di caricamento della DLL segnalato in quell’ambiente. Il lavoro è completato quando il pacchetto viene importato correttamente senza l’eccezione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
opencv, python
Ambito
build-system, operating-systems
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.