Cannot open include file: ‘io.h‘: No such file or directory

Scenario:

When doing assignment 2 of cs231n, the job provides fast_ Layers.py file provides the fast implementation of forward propagation and back propagation of CNN convolution layer, in which the python module is used.


Problem Description:

Run “Python setup.py build” on the command line_ Ext — inplace “an error of” cannot open include file: ‘io. H’: no such file or directory “is reported to configure the relevant environment


Solution:

1. According to the article cannot open include file: ‘io. H’: no such file or directory, it is because we lack the windows 10 SDK and MSVC (a C/C + + compiler developed by Microsoft) and need to use visual studio to install.

However, I found that I have installed these two extensions:

Open “Visual Studio installer”:

                   

Click “modify”:                                       

  Then you can view what components you have installed in this interface:

2. In another answer, it is said to add a system variable named “include” and the value is the directory where the IO. H file in the windows 10 SDK is located, as shown in the following figure. You can search “urct \ \ io. H” on your computer to see the path.

  Run “Python setup.py build” after adding_ Ext — inplace “, there is another error:” cannot open include file: ‘basetsd. H’: no such file or directory “. Similarly, find the directory of” basetsd. H “(the file is also in the windows 10 SDK) and add it to the” include “system variable just created to solve the problem.

After solving this problem, an error appears: “link: fatal error LNK1104: cannot open file ‘Kernel32. Lib’.”. Continue to create a new system variable. The variable name is “lib” and the value is the directory of the kernel32.lib file (which is also in the windows 10 SDK). Run again and no error is reported.

Read More: