title: can't include Python.h in visual studio
body: <p>(I do find a lot of similar questions, but so far non of these fits me...)</p>
  <p>===========Updated error message, images, Command Line===========</p>
  <p>I am trying to <code>#include &lt;Python.h&gt;</code>(that's nearly all the code, the main function is almost empty yet) in Visual Studio, but it keeps reminding me <code>cannot open source file &quot;Python.h&quot;</code>, if I run the program, it will raise an error:</p>
  <p><code>fatal error C1083: Cannot open include file: 'Python.h': No such file or directory</code>.</p>
  <p>I added the include and library directories in project <code>Property Pages</code> &gt; <code>VC++ Directories</code>, not working, tried to add the path to <code>C/C++</code> &gt; <code>Additional Include Directories</code>, not working, and I tried to change it to release mode, still not working...</p>
  <p><a href="https://i.stack.imgur.com/rm6YG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rm6YG.png" alt="VC++" /></a>
  <a href="https://i.stack.imgur.com/1Ic5D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Ic5D.png" alt="C/C++" /></a></p>
  <p>=================Update 2.0================</p>
  <p>I add <code>%(AdditionalIncludeDirectories);</code> to <code>C/C++</code> &gt; <code>Additional Include Directories</code> but seems not to work.</p>
  <p>Then I did something really stupid: I copied the headers and .dll to the header include folder... Now it doesn't remind me can't find Python.h any longer, I can code:</p>
  <pre><code>Py_Initialize();
  PyRun_SimpleString(&quot;print('Hello Python!')&quot;);
  Py_Finalize();
  </code></pre>
  <p>but it won't compile... I got a new error message:</p>
  <pre><code>'&quot;C:\Amarth\Programing\CPlusPlusLearning\Release\CPlusPlusLearning.exe&quot;' is not recognized as an internal or external command,
  operable program or batch file.
  </code></pre>
  <p>And in Output, it's:</p>
  <pre><code>1&gt;------ Build started: Project: CPlusPlusLearning, Configuration: Release Win32 ------
  1&gt;  PartOne.cpp
  1&gt;PartOne.cpp(34): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
  1&gt;PartOne.obj : error LNK2001: unresolved external symbol __imp__Py_Finalize
  1&gt;PartOne.obj : error LNK2001: unresolved external symbol __imp__Py_Initialize
  1&gt;PartOne.obj : error LNK2001: unresolved external symbol __imp__PyRun_SimpleStringFlags
  1&gt;C:\Amarth\Computer_Graphics\Programing\CPlusPlusLearning\Release\CPlusPlusLearning.exe : fatal error LNK1120: 3 unresolved externals
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  <p>That seems obvious as the compiler can only find the function declaration but can't find the definition... Besides, according to the similar questions I've seen, most people solved the problem after adding the include directories. So if I'm really facing a fancy problem, will it be possible to find and copy all the function definitions then make it work in some way ?</p>
  <p>==============OTHER MESSAGES===============</p>
  <p>I'm using python 3.5, installed by Anaconda. The <code>include</code> and <code>libs</code> folder is under <code>C:\Users\Amarthgul\Anaconda3</code>, which is also added to <code>system variable</code> &gt; <code>path</code>. There's also a Python 3.6 in my computer, but normally I only use its Manuals, and yet it haven't cause any trouble in python environment. Command Line:</p>
  <pre><code>/GS /GL /W3 /Gy /Zc:wchar_t /I&quot;C:\Users\Amarthgul\Anaconda3\include&quot; /Zi /Gm- /O2 /sdl /Fd&quot;x64\Release\vc140.pdb&quot; /Zc:inline /fp:precise /D &quot;NDEBUG&quot; /D &quot;_CONSOLE&quot; /D &quot;_UNICODE&quot; /D &quot;UNICODE&quot; /errorReport:prompt /WX- /Zc:forScope /Gd /Oi /MD /Fa&quot;x64\Release\&quot; /EHsc /nologo /Fo&quot;x64\Release\&quot; /Fp&quot;x64\Release\CPlusPlusLearning.pch&quot;  
  </code></pre>