Incompatibility with Numpy 1.x

Aperta
#1,211 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
numpy, opencv, python
Ambito
build-system

Direzione di ricerca

Il report identifica opencv-python-headless==4.12.0.88 e i relativi metadati pip, ma non identifica alcun file del repository né alcun test. Inizia esaminando il requisito NumPy del wheel e la configurazione di build e release del pacchetto, quindi riproduci l’installazione con NumPy 1.x; il lavoro è concluso quando il vincolo supportato è stato convalidato senza rompere il wheel pubblicato.

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

Descrizione

Starting with opencv-python-headless==4.12.0.88, pip reports incompatibility with numpy<2.

pip output
# pip install opencv-python-headless==4.12.0.88
Collecting opencv-python-headless==4.12.0.88
  Using cached opencv_python_headless-4.12.0.88-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (19 kB)
Collecting numpy<2.3.0,>=2 (from opencv-python-headless==4.12.0.88)
  Using cached numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (62 kB)
Using cached opencv_python_headless-4.12.0.88-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (54.0 MB)
Using cached numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
Installing collected packages: numpy, opencv-python-headless
  Attempting uninstall: numpy
    Found existing installation: numpy 1.26.4
    Uninstalling numpy-1.26.4:
      Successfully uninstalled numpy-1.26.4
  Attempting uninstall: opencv-python-headless
    Found existing installation: opencv-python-headless 4.13.0.92
    Uninstalling opencv-python-headless-4.13.0.92:
      Successfully uninstalled opencv-python-headless-4.13.0.92
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
atom 0.4.0 requires numpy==1.26.4, but you have numpy 2.2.6 which is incompatible.

This is an issue for me, because I'm stuck on numpy 1.x for other reasons. I think that the opencv numpy constraint could be relaxed, however. From the numpy docs:

When you build wheels for your package using a NumPy 2.x version at build time, those will work with NumPy 1.xx.
https://numpy.org/doc/2.0/dev/depending_on_numpy.html#numpy-2-0-specific-advice

Is there some other reason that I'm not aware for the incompatibility? Otherwise, I can open a PR for this.

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

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.

Altre issue di opencv/opencv-python

Tutte le issue di opencv/opencv-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.