简体   繁体   中英

Missing Python.h in Windows

I'm trying to run some python code from my c program by using the python.h header but I keep getting fatal error: Python.h: No such file or directory

After checking my anaconda environment, I have found a Python.h file in ...Anaconda/envs/myenv/include I tried adding this path to my system variable's PATH but it didn't work. How can I include the Python.h file from my anaconda env to my program?

PATH is only used for executables, not C headers. Tell your compiler or build system to add this path. On gcc and clang, for example, it's the -I flag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM