Ask Your Question

daliu's profile - activity

2017-10-25 13:07:35 +0200 received badge  Famous Question (source)
2016-10-18 13:52:02 +0200 received badge  Student (source)
2015-03-02 23:23:43 +0200 received badge  Notable Question (source)
2014-05-19 03:10:35 +0200 received badge  Popular Question (source)
2012-06-28 18:04:34 +0200 asked a question Sage/Cython compile embedded Cython with Sage import

Hi,

I was wondering how you can compile a Sage .pyx file into an embedded Cython .c file and compile it with gcc to create a standalone executable?

I tried:

sage -cython --embed filename.pyx
gcc filename.c -I/path/to/python -lpython2.7

but when I run the program it gives me the following error:

from sage.all import *
ImportError: No module named sage.all

Thanks!

Dan