docker python alpine numpy报错解决

2022/4/14 1:12:43

本文主要是介绍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


这篇关于docker python alpine numpy报错解决的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程