Fehler: subprocess-exited-with-error × Das Ausführen von setup.py install für lru-dict wurde nicht erfolgreich ausgeführPython

Python-Programme
Guest
 Fehler: subprocess-exited-with-error × Das Ausführen von setup.py install für lru-dict wurde nicht erfolgreich ausgeführ

Post by Guest »

Ich versuche, ein Container-Image mit AWS EC2 Ubuntu zu erstellen, um ein Python-Skript, das die web3.py-Bibliothek benötigt, auf das AWS ECR-Repository zu übertragen. Allerdings wird mir ein Fehler angezeigt, den ich nicht beheben kann. Ich verwende dazu AWS ECR-Push-Befehle.
Der Befehl lautet: docker build -t docker-lambda .
Mein Docker-Datei:

Code: Select all

FROM public.ecr.aws/lambda/python:3.8

COPY requirements.txt ./

RUN pip3 install -r requirements.txt

COPY app.py ./

CMD ["app.lambda_handler"]
requirements.txt:

Code: Select all

web3
Fehlermeldung:

Code: Select all

error: subprocess-exited-with-error

× Running setup.py install for lru-dict did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
running install
running build
running build_ext
building 'lru' extension
creating build
creating build/temp.linux-x86_64-3.8
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/var/lang/include/python3.8 -c lru.c -o build/temp.linux-x86_64-3.8/lru.o
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> lru-dict

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post