0

I am using GNU bash on Windows 10, version 4.4.23(1)-release (x86_64-pc-msys). So I have read all the resources and installed all the tools from VS Build Tools, added the /ucrt folder to my bash path and it DOES include io.h file. I tried with multiple version of Windows SDK, they all have the io.h file. I am using Anaconda version of python, Python 3.6.6 :: Anaconda custom (64-bit), to use cythonize package and I don't know what to do. I feel like its an issue where anaconda is communicating with bash but doesn't know where to look for the io.h file. Shouldn't it just look for it in my path? It works on Windows CMD but not in bash.

Here is output from console and here is my path:

bioinformatics$ cythonize -b taxcode.pyx
running build_ext
building 'taxcode' extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\bjwil\Anaconda3\include -IC:\Users\bjwil\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" /TcC:\Users\bjwil\bioinformatics\taxcode.c /Fobuild\temp.win-amd64-3.6\Release\Users\bjwil\bioinformatics\taxcode.obj
taxcode.c
c:\users\bjwil\anaconda3\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

$PATH:

/c/Perl64/bin
/c/Perl64/site/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/X11/bin
/c/Users/bjwil/Anaconda3
/c/Users/bjwil/Anaconda3/Scripts
/c/ProgramData/Microsoft/Windows/Start Menu/Programs/Notepad++
/c/ProgramData/chocolatey/bin
/c/Program Files/git/cmd
/c/Program Files/MySQL/MySQL Server 5.7/bin
/c/Users/bjwil/Anaconda3/Lib/site-packages/pymol
/c/Program Files/R/R-3.5.1/bin
/c/ProgramData/Microsoft/Windows/Start Menu/Microsoft R Client
/c/Users/bjwil/OneDrive/Documents/R
/c/Program Files/sratoolkit.2.9.2-win64/bin
/c/ProgramData/Microsoft/Windows/Start Menu/Programs/Visual Studio 2017/Visual Studio Tools/VC
/c/ProgramData/Microsoft/Windows/Start Menu/Programs/GNU Octave 4.4.1/
/c/Program Files/Git/mingw64/bin/
/c/Rtools/bin
/c/Users/bjwil/local/bin/
/c/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt
Brian Wiley
  • 485
  • 2
  • 11
  • 21

1 Answers1

0

I don't known if is a little late to respond, but, the problem is a environment variable of visual studio named 'INCLUDE', this variable don't exists by default, you must create this and then set the path of your librays, in windows the path is usually C:\Program Files (x86)\Windows Kits\"your version"\Include\"your version"\ucrt.

I recommend search for the file in the Windows Kits folder to locate the exact path, for more information about the cl environment variables you can go to: https://learn.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=vs-2019

Oscar Gallo
  • 11
  • 1
  • 3