[entwicklungsumgebung] 'pip install -r requirements.txt' schlägt fehl

Fragen zur Nutzung, Features, usw..
Antworten
Benutzeravatar
Thomas aus W
Beiträge: 1037
Registriert: Mi Apr 01, 2020 4:00 pm
Has thanked: 92 times
Been thanked: 37 times

[entwicklungsumgebung] 'pip install -r requirements.txt' schlägt fehl

Beitrag von Thomas aus W »

Da das Programmiern im Github-Webeditor doch recht mühselig ist versuche ich gerade, eine lokale Entwicklungsumgebung aufzusetzten.

Ich habe ein virtuelles Environment angelegt und versuche mit diesem gerade 'pip install -r requirements.txt' auszuführen. Dabei erhalte ich folgenden Fehler:

Code: Alles auswählen

$ python3 --version
Python 3.12.3
$pip install -r requirements.txt
Collecting setuptools<81 (from -r requirements.txt (line 1))
  Using cached setuptools-80.9.0-py3-none-any.whl.metadata (6.6 kB)
## mehr "Collecting..."
  Using cached sniffio-1.3.1-py3-none-any.whl (10 kB)
Building wheels for collected packages: jq
  Building wheel for jq (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for jq (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [1290 lines of output]
      /tmp/pip-build-env-k5my46qc/overlay/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!
## millionen Warnungen ...
      Executing: ./configure CFLAGS=-fPIC -pthread --disable-maintainer-mode --with-oniguruma=/tmp/pip-install-e9m5irik/jq_c4c7cb82c35d4042bff9b84e39768180/_deps/onig-install-6.9.4
      Executing: make
      building 'jq' extension
      creating build/temp.linux-x86_64-cpython-312
      x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/tmp/pip-install-e9m5irik/jq_c4c7cb82c35d4042bff9b84e39768180/_deps/jq-1.6/src -I/home/thomas/Dokumente/Haus/E-Auto/OWB/update/version-2.0/.venv/include -I/usr/include/python3.12 -c jq.c -o build/temp.linux-x86_64-cpython-312/jq.o
      jq.c:196:12: fatal error: longintrepr.h: Datei oder Verzeichnis nicht gefunden
        196 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for jq
Failed to build jq
ERROR: Could not build wheels for jq, which is required to install pyproject.toml-based projects
Die Lösungsvorschläge von ChatGPT habe ich erfolglos abgearbeitet.

Hat womöglich jemand einen funktionierenden Vorschlag?


PS: natürlich ist jq bereits installiert...

Code: Alles auswählen

$ jq --version
jq-1.7
bye
TW
gvz
Beiträge: 76
Registriert: So Sep 12, 2021 8:28 am
Wohnort: Grevenbroich
Has thanked: 1 time

Re: [entwicklungsumgebung] 'pip install -r requirements.txt' schlägt fehl

Beitrag von gvz »

Ich habe es gerade mal auf dem Mac probiert:
Da moppert er über "aiohttp==3.12.14" - ich habe es auf "aiohttp==3.10.11" geändert.
Mach' doch ein ">=" aus dem "==" - dann sollte er mit Deinem jq 1.7 ja zufrieden sein. Auf der offiziellen SD-Karte ist übrigens 1.6 - insofern ist das "==" ohnehin offenbar nicht mission critical.
OpenWB S2 (Touchscreen, RFID, Zähler, 11kW), 10 kWp PV ohne Speicher, ID.3
Benutzeravatar
Thomas aus W
Beiträge: 1037
Registriert: Mi Apr 01, 2020 4:00 pm
Has thanked: 92 times
Been thanked: 37 times

Re: [entwicklungsumgebung] 'pip install -r requirements.txt' schlägt fehl

Beitrag von Thomas aus W »

gvz hat geschrieben: Do Okt 09, 2025 2:13 pm Da moppert er über "aiohttp==3.12.14" - ich habe es auf "aiohttp==3.10.11" geändert.
Mach' doch ein ">=" aus dem "=="
Ich habe aiohttp sogar ganz aus der requirements.txt geworfen, selbes Ergebnis...

bye
TW
Basti
Beiträge: 136
Registriert: Di Feb 21, 2023 3:28 pm
Has thanked: 1 time
Been thanked: 21 times

Re: [entwicklungsumgebung] 'pip install -r requirements.txt' schlägt fehl

Beitrag von Basti »

Das Problem ist : Python 3.12.3 geh auf 3.9 und installiere es wie in der Anleitung .
Antworten