#include <Python.h> no such file or directory for windows 10 fix


I am trying to build an extension in C for python 3 and I am using Windows. This might be a duplicate question but all the answers for the other question were for linux and I can run sudo on windows.
How do I fix this problem ?


Nevermind, I found the answer.
You must first search in your python directory for the ‘include’ folder, for example: “C:\Users\David\AppData\Local\Programs\Python\Python38-32\include”, this is where mine is located and then search for Python.h and like that, you have the header.

Answered By – David

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published