Подпроцесс pip для установки зависимостей сборки не был запущен успешно [дубликат]Python

Программы на Python
Ответить Пред. темаСлед. тема
Anonymous
 Подпроцесс pip для установки зависимостей сборки не был запущен успешно [дубликат]

Сообщение Anonymous »

С помощью следующего файла докеров:

Код: Выделить всё

FROM python:3.9-slim-buster

WORKDIR /python-docker

COPY requirements.txt requirements.txt

RUN python3 -m pip install --upgrade pip

RUN pip3 install -r requirements.txt

COPY . .

EXPOSE 5000

CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"]
файл требований следующим образом:

Код: Выделить всё

boto3==1.21.32
Flask==2.2.2
Flask_Cors==3.0.10
hvac==1.0.2
PyJWT==2.6.0
PyMySQL==0.10.1
zenpy==2.0.24
gunicorn==20.1.0
pandas==1.4.2
Когда я попытался создать файл Docker с несколькими дугами с помощью следующей команды,

Код: Выделить всё

docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t name/flask-docker:latest --push .
[/b]
Он отображает следующий результат:

Код: Выделить всё

× pip subprocess to install build dependencies did not run successfully.
#0 148.6   │ exit code: 1
#0 148.6   ╰─> [262 lines of output]
#0 148.6       Collecting setuptools>=51.0.0
#0 148.6         Downloading setuptools-65.6.0-py3-none-any.whl (1.2 MB)
#0 148.6            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 7.0 MB/s eta 0:00:00
#0 148.6       Collecting wheel
#0 148.6         Downloading wheel-0.38.4-py3-none-any.whl (36 kB)
#0 148.6       Collecting Cython=0.29.24
#0 148.6         Downloading Cython-0.29.32-py2.py3-none-any.whl (986 kB)
#0 148.6            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 986.3/986.3 kB 9.1 MB/s eta 0:00:00
#0 148.6       Collecting oldest-supported-numpy>=0.10
#0 148.6         Downloading oldest_supported_numpy-2022.11.19-py3-none-any.whl (4.9 kB)
#0 148.6       Collecting numpy==1.19.3
#0 148.6         Downloading numpy-1.19.3.zip (7.3 MB)
#0 148.6            ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 13.4 MB/s eta 0:00:00
#0 148.6         Installing build dependencies: started
#0 148.6         Installing build dependencies: finished with status 'done'
#0 148.6         Getting requirements to build wheel: started
#0 148.6         Getting requirements to build wheel: finished with status 'done'
#0 148.6         Preparing metadata (pyproject.toml): started
#0 148.6         Preparing metadata (pyproject.toml): still running...
#0 148.6         Preparing metadata (pyproject.toml): finished with status 'error'
#0 148.6         error: subprocess-exited-with-error
#0 148.6
#0 148.6         × Preparing metadata (pyproject.toml) did not run successfully.
#0 148.6         │ exit code: 1
#0 148.6         ╰─> [227 lines of output]
#0 148.6             Running from numpy source directory.
#0 148.6             setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
#0 148.6               run_build = parse_setuppy_commands()
#0 148.6             Processing numpy/random/_bounded_integers.pxd.in
#0 148.6             Processing numpy/random/_common.pyx
#0 148.6             Processing numpy/random/_mt19937.pyx
#0 148.6             Processing numpy/random/_philox.pyx
#0 148.6             Processing numpy/random/mtrand.pyx
#0 148.6             Processing numpy/random/bit_generator.pyx

RuntimeError: Broken toolchain: cannot link a simple C program
#0 148.6             [end of output]
#0 148.6
#0 148.6         note: This error originates from a subprocess, and is likely not a problem with pip.
#0 148.6       error: metadata-generation-failed
#0 148.6
#0 148.6       × Encountered error while generating package metadata.
#0 148.6       ╰─> See above for output.
#0 148.6
#0 148.6       note: This is an issue with the package mentioned above, not pip.
#0 148.6       hint: See above for details.
#0 148.6       [end of output]
#0 148.6
#0 148.6   note: This error originates from a subprocess, and is likely not a problem with pip.
#0 148.6 error: subprocess-exited-with-error
#0 148.6
#0 148.6 × pip subprocess to install build dependencies did not run successfully.
#0 148.6 │ exit code: 1
#0 148.6 ╰─> See above for output.
#0 148.6
#0 148.6 note: This error originates from a subprocess, and is likely not a problem with pip.
------
Dockerfile:9
--------------------
7 |     RUN python3 -m pip install --upgrade pip
8 |
9 | >>> RUN pip3 install -r requirements.txt
Поскольку в приведенной выше проблеме говорится, что это не проблема с pip , невозможно точно понять, связана ли это с каким-либо из базовых пакетов или нет?
Примечание. Я попробовал удалить pandas из файла требований, и это работает, но мне это нужно, поскольку у меня есть импорт, основанный на этом.>

Подробнее здесь: https://stackoverflow.com/questions/745 ... ccessfully
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Python»