使用gcc编译时,我的文件为我提供了以下内容:Python.h:没有这样的文件或目录## [错误] #include“ Python.h”

时间:2019-05-11 16:54:04

标签: python compilation cython

当我用gcc编译程序时,它不起作用...

Error:
[error]run.c:4:10: fatal error: Python.h: No such file or directory 
[error] include "Python.h"           ^~~~~~~~~~ 
[error]compilation terminated. 
[error]Cmd.exe exited with code '1'.

我的设置代码:

from distutils.core import setup
from Cython.Build import cythonize
from Cython.Compiler import Options
Options.embed = True
Options.embed = "run"
setup(
    ext_modules = cythonize("run.pyx")
)

0 个答案:

没有答案