Problem Description
I am on a school computer, so I can't install anything.
I am trying to create C code which can be run in Python. It seems all the articles I am finding on it require you to use
#include <Python.h>
I do this, but when I compile it complains that *there is no such file or directory.*
The computer has Python (at least it has the `python` command in the terminal, and we can run whatever Python code we want).
I typed in `locate Python.h` in the terminal, but it found nothing.
I have two questions:
1. Can I write C code that I can call in Python without `Python.h`?
2. Am I missing something, and the computer actually has `Python.h`?
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?