A module that was compiled using NumPy 1.x cannot be run in NumPy 2.x – ein Paket passt nicht zur installierten NumPy-Version
Ein Paket wurde für NumPy 1.x gebaut, in deiner Umgebung ist aber NumPy 2.x installiert.
Die Meldung
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. … AttributeError: _ARRAY_API not found
Betrifft: Python, ComfyUI, AUTOMATIC1111 Stable Diffusion WebUI, Stable Diffusion WebUI Forge
Warum passiert das?
NumPy 2.0 hat die interne Schnittstelle für kompilierte Pakete geändert. Pakete, die gegen NumPy 1.x gebaut wurden, funktionieren mit NumPy 2 nicht mehr, umgekehrt geht es dagegen. Meist hat ein anderes Paket oder eine Erweiterung NumPy 2 mitinstalliert, während ein älteres Paket wie OpenCV (cv2) noch die alte Version erwartet. Oft folgt direkt danach ein ImportError und das Paket lädt gar nicht.
So löst du es
- Schau im Traceback über der Meldung nach, welcher Import fehlschlägt (zum Beispiel
import cv2). Das ist das Paket, das noch für NumPy 1.x gebaut ist. - Prüfe die installierte NumPy-Version in der Umgebung des Programms:
python -m pip show numpy. Bei ComfyUI portable im ComfyUI-Ordner:.\python_embeded\python.exe -m pip show numpy. - Besser zuerst: Aktualisiere das betroffene Paket auf eine Version, die für NumPy 2 gebaut ist, zum Beispiel
python -m pip install --upgrade opencv-python(Paketname aus Schritt 1 einsetzen). - Gibt es keine passende neue Version, setze NumPy unter Version 2 zurück, wie es die Meldung selbst vorschlägt:
python -m pip install "numpy<2". Bei ComfyUI portable:.\python_embeded\python.exe -m pip install "numpy<2". - Starte das Programm neu und prüfe, ob die Meldung weg ist.
Lieber nicht: Ignoriere die Meldung nicht, denn das betroffene Modul kann abstürzen oder lädt wie bei OpenCV gar nicht erst.
Nochmal sauber einrichten
Klappt es danach immer noch nicht, hilft oft eine frische Einrichtung Schritt für Schritt:
- ComfyUI unter Windows einrichten und pflegen
Desktop oder Portable, wohin die Modelle gehören, Modelle mit anderen Programmen teilen, Zusatz-Nodes sicher installieren, Updates, Startop… - Dein erstes Bild mit ComfyUI
Comfy Desktop installieren, die Oberfläche verstehen und mit FLUX.2 [klein] 4B oder Z-Image Turbo dein erstes KI-Bild erzeugen. - Dein erstes KI-Video mit LTX in ComfyUI
Mit LTX-2.3 in ComfyUI kurze Videos mit Ton aus Text oder einem Bild erzeugen. Vorlage, Dateien, Einstellungen und Lizenz.
Begriffe dazu
Ähnliche Fehler
- ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied – pip darf eine Datei nicht ändern
- ImportError: DLL load failed while importing …: The specified module could not be found – einem Python-Paket fehlt eine Windows-DLL
- No matching distribution found for torch (falsche Python-Version)
- pip: Microsoft Visual C++ 14.0 or greater is required
- 'python' wird nicht erkannt oder öffnet den Microsoft Store
Quellen
- https://numpy.org/devdocs/dev/depending_on_numpy.html
- https://github.com/PythonOT/POT/issues/644
- https://github.com/opencv/opencv-python/issues/1149
Geprüft am 27.10.2026. Hat das nicht geholfen? Frag im Forum und nenne Grafikkarte, Programm und die vollständige Meldung.