Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#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 ?

like image 453
David Avatar asked Sep 21 '25 06:09

David


1 Answers

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.

like image 50
David Avatar answered Sep 22 '25 19:09

David