Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Numpy install Broken toolchain: cannot link a simple C program

System:

Windows 10
Python 3.7
Numpy 1.15.1
VS 2017

I don't believe this is a duplicate as the following proposed resolutions have failed:

  • (for homebrew - N/A) Numpy Install RuntimeError: Broken toolchain: cannot link a simple C program
  • (Unanswered) PyCharm pip installs fail, RuntimeError: Broken toolchain: cannot link a simple C program
  • (Windows no sudo) Problems with pip install numpy - RuntimeError: Broken toolchain: cannot link a simple C program

Additional Note: I don't have network access so I'm using 'basket' my install line is as follows:

pip install --no-index -f .basked numpy

I've run this in the command prompt, power shell, and VS command prompt

Final Error in Traceback:

 377, in generate_sources
        source = func(extension, build_dir)
      File "numpy\core\setup.py", line 666, in get_mathlib_info
        raise RuntimeError("Broken toolchain: cannot link a simple C program")
    RuntimeError: Broken toolchain: cannot link a simple C program
like image 272
Schalton Avatar asked Sep 10 '18 21:09

Schalton


1 Answers

I just answered the exact same question here: https://stackoverflow.com/a/61563861/209532

In short: You need to have mt.exe on the path to compile, Since Visual Studio 2017, is has been removed and is now to be found in the Windows SDK.

like image 75
chjortlund Avatar answered Sep 23 '22 12:09

chjortlund