Reputation: 71
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?
Upvotes: 0
Views: 711
Reputation: 182038
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.
Upvotes: 1