title: Visual Studio Code "python.h: No such file or directory" windows gcc
body: <p>I 'm a total beginner in <strong>C++</strong> and getting crazy trying to embed <strong>Python</strong> in <strong>C++</strong> using <strong>VS Code</strong> IDE and <strong>GCC</strong> compiler.
  I am stock and now I 'm keep facing this silly error that says:</p>
  <blockquote>
  <p>python.h: No such file or directory gcc</p>
  </blockquote>
  <p>I have followed steps explaned in <a href="https://code.visualstudio.com/docs/cpp/config-mingw" rel="nofollow noreferrer">&quot;Using GCC with MinGW in VS Code&quot;</a> in order to configure <strong>C++</strong> in <strong>VS Code</strong> but I failed to install <strong>MinGW</strong> (The bin folder was empty) so I add already installed <strong>CodeBlocks MinGW</strong> to my path and it seems to work.</p>
  <p>I have <strong>python 3.8</strong> installed and tried other solutions and already put <strong>Python.h</strong> and <strong>python library path</strong> in project include path.</p>
  <blockquote>
  <p>&quot;C:/Users/MPC/AppData/Local/Programs/Python/Python38-32/include/<strong>&quot;
  and
  &quot;C:/Users/MPC/AppData/Local/Programs/Python/Python38-32/libs/</strong>&quot;</p>
  </blockquote>
  <p>here is the code that I want to compile:</p>
  <pre><code>    #include &lt;stdio.h&gt;
      #include &lt;conio.h&gt;
      #include &lt;python.h&gt;
  
      int main()
  {
      PyObject* pInt;
  
      Py_Initialize();
  
      PyRun_SimpleString(&quot;print('Hello World from Embedded Python!!!')&quot;);
      
      Py_Finalize();
  
      printf(&quot;\nPress any key to exit...\n&quot;);
      if(!_getch()) _getch();
      return 0;
  }
  </code></pre>
  <p>and this is my <strong>c_cpp_properties.json</strong>. (C++ configuration file):</p>
  <pre><code>{
      &quot;configurations&quot;: [
          {
              &quot;name&quot;: &quot;Win32&quot;,
              &quot;includePath&quot;: [
                  &quot;${workspaceFolder}/**&quot;,
                  &quot;C:/Users/MPC/AppData/Local/Programs/Python/Python38-32/include/**&quot;,
                  &quot;C:/Users/MPC/AppData/Local/Programs/Python/Python38-32/libs/**&quot;
              ],
              &quot;defines&quot;: [
                  &quot;_DEBUG&quot;,
                  &quot;UNICODE&quot;,
                  &quot;_UNICODE&quot;
              ],
              &quot;windowsSdkVersion&quot;: &quot;10.0.18362.0&quot;,
              &quot;compilerPath&quot;: &quot;C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe&quot;,
              &quot;cStandard&quot;: &quot;c17&quot;,
              &quot;cppStandard&quot;: &quot;c++17&quot;,
              &quot;intelliSenseMode&quot;: &quot;windows-gcc-x86&quot;
          }
      ],
      &quot;version&quot;: 4
  }
  </code></pre>
  <p>and this is <strong>tasks.json</strong> file:</p>
  <pre><code>{
  &quot;version&quot;: &quot;2.0.0&quot;,
  &quot;tasks&quot;: [
      {
          &quot;type&quot;: &quot;cppbuild&quot;,
          &quot;label&quot;: &quot;C/C++: gcc.exe build active file&quot;,
          &quot;command&quot;: &quot;C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe&quot;,
          &quot;args&quot;: [
              &quot;-g&quot;,
              &quot;${file}&quot;,
              &quot;-o&quot;,
              &quot;${fileDirname}\\${fileBasenameNoExtension}.exe&quot;
          ],
          &quot;options&quot;: {
              &quot;cwd&quot;: &quot;C:/Program Files (x86)/CodeBlocks/MinGW/bin&quot;
          },
          &quot;problemMatcher&quot;: [
              &quot;$gcc&quot;
          ],
          &quot;group&quot;: {
              &quot;kind&quot;: &quot;build&quot;,
              &quot;isDefault&quot;: true
          },
          &quot;detail&quot;: &quot;compiler: \&quot;C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe\&quot;&quot;
      }
  ]
  </code></pre>
  <p>}</p>