Numpy Install RuntimeError: Broken toolchain: cannot link a simple C program

前端 未结 4 560
既然无缘
既然无缘 2020-12-18 16:20

(macbook air)

I spent a while trying to install this. First off, I can\'t use Homebrew because I installed it but then the \'network connection\' dropped and now my

相关标签:
4条回答
  • 2020-12-18 17:08

    update the pip using python -m pip install --upgrade pip

    then install your library pip install your_library

    0 讨论(0)
  • 2020-12-18 17:15

    I'm having this same problem (only I'm using brew install numpy), with:

    File "numpy/core/setup.py", line 686, in get_mathlib_info
        raise RuntimeError("Broken toolchain: cannot link a simple C program")
    RuntimeError: Broken toolchain: cannot link a simple C program
    

    (Here is a full gist-log of my error.)

    This question has some potential solutions: Problems with pip install numpy - RuntimeError: Broken toolchain: cannot link a simple C program.

    Though I don't want to resort to sudo, and I want to stick with homebrew (because I'm really aiming for a homebrewed opencv), so I've had no luck so far.

    Edit: adding export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future to my .bash_profile (as was suggested in the other question I linked) let brew install numpy almost flawlessly. All that remained after was that I had to brew link --overwrite numpy (because I had a non-brew installation of numpy before). Seems to be working now.

    0 讨论(0)
  • 2020-12-18 17:18

    I had a similar issue with Python3 numpy install in Fedora 24

    Solution provided here by Ollegn that worked for me was:

    sudo dnf install python3-devel
    sudo dnf install make automake gcc gcc-c++ gcc-gfortran
    sudo dnf install redhat-rpm-config
    sudo dnf install subversion
    sudo pip3 install -U numpy
    
    0 讨论(0)
  • 2020-12-18 17:20

    I ran into this issue twice, and both times I fixed it this way: abandoning pip.

    First time was on osx I did brew install numpy. Homebrew will take care of all of the dependencies.

    Second time was on centos7 and much like above I just yum install -y numpy.

    0 讨论(0)
提交回复
热议问题