Why is Visual Studio 2015 reporting missing headers when creating Python modules from source?

I am trying to install the scikits.samplerate library for Python on Windows 10. My version of Python 3.5.1 is installed with the Anaconda distribution using the MSVC 14.0 compiler. I compiled and linked the required libsamplerate files. However, when I go to install the module using the command

python setup.py install

I'm missing file header errors. I have first

Cannot open include file: 'corecrt.h': No such file or directory

but this is not the only heading missing. There are other basics like stdlib.h and io.h.

I think my question is, is there something wrong with my installation of Visual Studio 2015? I already installed Visual Studio 2013, so it somehow messed up? I am aware of the switch to universal CRT, but the include directory that the compilation command points to does not actually exist:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\ucrt

I have two more ucrt include directories, but they are in the following:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt

Adding these as included directories and continuing with scikits.samplerate results in

python.exe has stopped working

I really have no ideas, and I would really like this library to work.

+4
source share
1 answer

The compiler is called using:

-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt

But you have 2 ucrtfolders (somewhere else):

C:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt

So you need to copy the folder:

C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt
to
C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt

libs:

C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt
to
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\ucrt
0

Source: https://habr.com/ru/post/1626936/


All Articles