1

I really tried just about everything I found on the web including the StackOverflow answers to no avail..

When I'm running

python setup.py build_ext --inplace
to compile my Cython code, the error shows up:
C:\Users\irmsc\AppData\Local\Programs\Python\Python38\include\pyconfig.h(59): fa
tal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Communit
y\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit sta
tus 2

Any ideas? I have tried:

  1. Reinstalling Visual Strudio
  2. Install ALL packages in Build tools
  3. Adding some path variables
  4. Running the compilation through Developer Command Prompt for VS
Andrey Kurnikovs
  • 407
  • 1
  • 5
  • 21
  • Have you been through this: https://stackoverflow.com/questions/40018405/cannot-open-include-file-io-h-no-such-file-or-directory? I think the "windows 10 SDK" is important, so I'd make absolutely sure that's included in the packages you've installed – DavidW Sep 16 '21 at 20:21
  • Yes, I absolutely have – Andrey Kurnikovs Sep 17 '21 at 13:29
  • You need to look at the include paths when you are building. `io.h` is in `C:\Program Files (x86)\Windows Kits\10\Include\\ucrt` (see https://stackoverflow.com/a/40810172/5769463) you must make sure that the path to the right run-time is used (by finding it on your disk and providing it if it is not picked up). – ead Sep 18 '21 at 06:39

0 Answers0