docker python alpine numpy报错解决

报错内容

untimeError: Broken toolchain: cannot link a simple C program
...
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

解决方法

# Dockerfile 在pip前安装g++
# 例如
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --no-cache g++
RUN /usr/local/bin/python -m pip install --upgrade pip

RUN pip install -r requirement.txt
RUN pip install -r speech_synthesis/requirement.txt
posted @ 2022-04-13 23:22  奔跑的兔  阅读(357)  评论(0编辑  收藏  举报