With a few hours worth of effort I've finally managed to convert my Python code to C, and then that to an exe file, to find the imports aren't working. I'm wondering if anyone knows how to make it include everything? None of my searches are coming up with anything.
I'm not sure if it'll make a difference, but this is how I'm doing it:
The --inplace
option wasn't working with a setup.py
(as in it would generate a C file which wouldn't compile), so I'm doing it through the command line with cython --embed -o main.c main.py
.
I copied the libs
and include
folder from Python into another one and from there I'm compiling the C files. Here's the error when I try run my script:
Traceback (most recent call last):
File "start_tracking.py", line 5, in init start_tracking (start_tracking.c:1133)
ImportError: No module named core.constants
How would I go about including all the imports in the generated C code (without just copying everything into one file)?