6

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:

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
Schalton
  • 2,867
  • 2
  • 32
  • 44
  • Presumably, NumPy can't find the C linker (or compiler). I guess that'll be because NumPy is installed with a wheel or some other form of precompiled binary. You'll have to ensure somehow that the C compiler and linker are available in the command prompt or shell, by setting the right values of path. Possibly, VS should show you somewhere in its settings where these programs are located. – 9769953 Sep 10 '18 at 21:38
  • Compiling is a hard way, maybe you can just download anaconda – Evgeny Sep 10 '18 at 22:02
  • I can't use anaconda for this unfortunately – Schalton Sep 10 '18 at 22:26
  • @9769953 So adding VS to the path variable? – Schalton Sep 10 '18 at 22:26

1 Answers1

3

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.

chjortlund
  • 3,613
  • 2
  • 31
  • 30