Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: Cython include other imports in generated code

Peter:

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



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: Cython include other imports in generated code

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×