Problems with pip install numpy - RuntimeError: Broken toolchain: cannot link a simple C program

For Docker (Alpine) and Python 3.x this worked for me:

RUN apk update
RUN apk add make automake gcc g++ subversion python3-dev

While it's ugly, it appears to work

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install --upgrade numpy

Note that if you are getting this error for a package other than numpy, (such as lxml) specify that package name instead of numpy at the end of the commnd.

I saw a similar issue someone was having with installing a gem

Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply_definedsuppress'

This is only a temporary fix, at some point the compiler options will have to be fixed


The problem is that you are unable to compile.

First, make sure that you have accepted the new Terms and Conditions with Xcode. To do this, just open up xCode and accept.

Then, try installing gcc with

brew install gcc

Finally, try to install Numpy with

pip install numpy

Hope this helps.