Kostenlos | Ohne Tracking | Jede Angabe mit Quelle|Deutsch und Englisch

Fehler / Installation

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

  1. 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.
  2. 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.
  3. 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).
  4. 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".
  5. 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:

Begriffe dazu

Ähnliche Fehler

Quellen

Geprüft am 27.10.2026. Hat das nicht geholfen? Frag im Forum und nenne Grafikkarte, Programm und die vollständige Meldung.